Class SliceUtils
java.lang.Object
org.eclipse.dawnsci.slicing.api.util.SliceUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SliceObjectcreateSliceObject(DimsDataList dimsDataHolder, SliceSource data, SliceObject sliceObject) Generates a list of slice information for a given set of dimensional data.static org.eclipse.january.dataset.IDatasetgetAxis(SliceObject currentSlice, IVariableManager varMan, int length, int iAxis, boolean requireIndicesOnError, org.eclipse.core.runtime.IProgressMonitor monitor) static org.eclipse.january.dataset.IDatasetgetAxis(SliceObject currentSlice, IVariableManager varMan, String origName, boolean requireUnit, org.eclipse.core.runtime.IProgressMonitor monitor) static org.eclipse.january.dataset.IDatasetgetAxis(SliceObject sliceObject, IVariableManager varMan, DimsData data, org.eclipse.core.runtime.IProgressMonitor monitor) static StringgetAxisLabel(SliceObject sliceObject, DimsData data) static StringgetAxisName(SliceObject sliceObject, DimsData data, String alternateName) static NumbergetAxisValue(SliceObject sliceObject, IVariableManager varMan, DimsData data, int value, org.eclipse.core.runtime.IProgressMonitor monitor) static List<SliceObject> getExpandedSlices(SliceSource data, DimsDataList ddl) Transforms a SliceComponent defined slice into an expanded set of slice objects so that the data can be sliced out of the h5 file.static List<SliceObject> getExpandedSlices(SliceSource data, DimsDataList ddl, ISliceRangeSubstituter substituter) Transforms a SliceComponent defined slice into an expanded set of slice objects so that the data can be sliced out of the h5 file.static IImageTracegetImageTrace(IPlottingSystem<?> plotting) this method gives access to the image trace plotted in the main plotter or null if one is not plotted.static org.eclipse.january.dataset.IDatasetgetSlice(org.eclipse.january.dataset.ILazyDataset ld, SliceObject currentSlice, org.eclipse.core.runtime.IProgressMonitor monitor) Get a slice from a ILazyDataset using a SliceObject which may contain information about slicing and operations to apply on the slice.
-
Field Details
-
EXT
-
-
Constructor Details
-
SliceUtils
public SliceUtils()
-
-
Method Details
-
createSliceObject
public static SliceObject createSliceObject(DimsDataList dimsDataHolder, SliceSource data, SliceObject sliceObject) throws Exception Generates a list of slice information for a given set of dimensional data. The data may have fields which use DOE annotations and hence can be expanded. This allows slices to be ranges in one or more dimensions which is a simple form of summing sub-sets of data.- Parameters:
dimsDataHolder-sliceObject-dataShape-- Returns:
- a list of slices
- Throws:
Exception
-
getAxisLabel
- Parameters:
sliceObject-data-- Returns:
- Throws:
Exception
-
getAxisName
- Parameters:
sliceObject-data-- Returns:
- Throws:
Exception
-
getAxisValue
public static Number getAxisValue(SliceObject sliceObject, IVariableManager varMan, DimsData data, int value, org.eclipse.core.runtime.IProgressMonitor monitor) throws Throwable - Parameters:
sliceObject-data-value-monitor-- Returns:
- the nexus axis value or the index if no nexus axis can be found.
- Throws:
Throwable
-
getAxis
public static org.eclipse.january.dataset.IDataset getAxis(SliceObject sliceObject, IVariableManager varMan, DimsData data, org.eclipse.core.runtime.IProgressMonitor monitor) throws Throwable - Parameters:
sliceObject-varMan-data-monitor-- Returns:
- Throws:
Throwable
-
getImageTrace
this method gives access to the image trace plotted in the main plotter or null if one is not plotted.- Returns:
-
getAxis
public static org.eclipse.january.dataset.IDataset getAxis(SliceObject currentSlice, IVariableManager varMan, int length, int iAxis, boolean requireIndicesOnError, org.eclipse.core.runtime.IProgressMonitor monitor) throws Exception - Parameters:
currentSlice-length- of axisiAxis- dimension (starting with 1 as in nexus)requireIndicesOnError-monitor-- Returns:
- Throws:
Exception
-
getAxis
public static org.eclipse.january.dataset.IDataset getAxis(SliceObject currentSlice, IVariableManager varMan, String origName, boolean requireUnit, org.eclipse.core.runtime.IProgressMonitor monitor) throws Throwable - Parameters:
currentSlice-requireUnit- - if true will get unit but will be slower.monitor-axisName- , full path and then optionally a : and the dimension which the axis is for.requireIndicesOnError-- Returns:
- Throws:
Throwable
-
getSlice
public static org.eclipse.january.dataset.IDataset getSlice(org.eclipse.january.dataset.ILazyDataset ld, SliceObject currentSlice, org.eclipse.core.runtime.IProgressMonitor monitor) throws Exception Get a slice from a ILazyDataset using a SliceObject which may contain information about slicing and operations to apply on the slice.- Parameters:
ld-currentSlice-monitor-- Returns:
- Throws:
Exception
-
getExpandedSlices
public static List<SliceObject> getExpandedSlices(SliceSource data, DimsDataList ddl) throws Exception Transforms a SliceComponent defined slice into an expanded set of slice objects so that the data can be sliced out of the h5 file.- Parameters:
fullShape-dimsDataList-- Returns:
- Throws:
Exception
-
getExpandedSlices
public static List<SliceObject> getExpandedSlices(SliceSource data, DimsDataList ddl, ISliceRangeSubstituter substituter) throws Exception Transforms a SliceComponent defined slice into an expanded set of slice objects so that the data can be sliced out of the h5 file.- Parameters:
fullShape-dimsDataList-- Returns:
- Throws:
Exception
-