Class LineSample
java.lang.Object
org.eclipse.dawnsci.analysis.dataset.impl.function.LineSample
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionLineSample(double sx, double sy, double ex, double ey, double step) Set up line sampling -
Method Summary
-
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:
valuein interfaceDatasetToDatasetFunction- Parameters:
datasets- input 2D datasets- Returns:
- one 1D dataset
-