java.lang.Object
org.eclipse.dawnsci.analysis.dataset.impl.function.LineSample
All Implemented Interfaces:
DatasetToDatasetFunction

public class LineSample extends Object implements DatasetToDatasetFunction
Sample along line and return list of one 1D dataset When mapping from image to data, the array value is assumed to be associated with the centre of the pixel, i.e. pixel co-ord - 0.5 = data co-ord. This half pixel offset is handled in this class so does not need to be accounted for else where.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LineSample(double sx, double sy, double ex, double ey, double step)
    Set up line sampling
  • Method Summary

    Modifier and Type
    Method
    Description
    int[]
    getPoint(int i)
     
    List<org.eclipse.january.dataset.Dataset>
    value(org.eclipse.january.dataset.IDataset... datasets)
    The class implements pointwise sampling along a given line

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LineSample

      public LineSample(double sx, double sy, double ex, double ey, double step)
      Set up line sampling
      Parameters:
      sx -
      sy -
      ex -
      ey -
      step -
  • Method Details

    • getPoint

      public int[] getPoint(int i)
      Parameters:
      i -
      Returns:
      position of indexed point on line
    • value

      public List<org.eclipse.january.dataset.Dataset> value(org.eclipse.january.dataset.IDataset... datasets)
      The class implements pointwise sampling along a given line
      Specified by:
      value in interface DatasetToDatasetFunction
      Parameters:
      datasets - input 2D datasets
      Returns:
      one 1D dataset