Class SliceUtils

java.lang.Object
org.eclipse.dawnsci.slicing.api.util.SliceUtils

public class SliceUtils extends Object
  • Field Details

  • 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

      public static String getAxisLabel(SliceObject sliceObject, DimsData data)
      Parameters:
      sliceObject -
      data -
      Returns:
      Throws:
      Exception
    • getAxisName

      public static String getAxisName(SliceObject sliceObject, DimsData data, String alternateName)
      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

      public static IImageTrace getImageTrace(IPlottingSystem<?> plotting)
      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 axis
      iAxis - 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