Package sc.fiji.snt.analysis
Class ProfileProcessor<T extends net.imglib2.type.numeric.RealType<T>>
java.lang.Object
sc.fiji.snt.analysis.ProfileProcessor<T>
- Type Parameters:
T- pixel type
- All Implemented Interfaces:
Callable<double[]>
public class ProfileProcessor<T extends net.imglib2.type.numeric.RealType<T>>
extends Object
implements Callable<double[]>
Profile intensities within local neighborhoods around
Path
PointInImages- Author:
- Cameron Arshadi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]call()Process and return the profile values.static ProfileProcessor.Metric[]Gets the array of availableProfileProcessor.MetricsgetRawValues(int nodeStep) Gets the raw values for each node at the specified step interval.static ProfileProcessor.Shape[]Gets the array of availableProfileProcessor.Shapesdouble[]The profile values, or null if they have not been processed yet.static voidvoidprocess()Processes the profile data by calling the computation.static <T extends net.imglib2.type.numeric.RealType<T>>
double[]profilePathNodes(net.imglib2.RandomAccessible<T> rai, Path path, double[] values) Get the intensities for the point coordinates of a PathvoidsetMetric(ProfileProcessor.Metric metric) Sets the metric to be computed for each local neighborhood.voidsetRadius(int radius) Specify a fixed radius for eachProfileProcessor.Shaperegion around eachPointInImage.voidsetShape(ProfileProcessor.Shape shape) Sets the shape to be iterated.
-
Constructor Details
-
ProfileProcessor
-
-
Method Details
-
getMetrics
Gets the array of availableProfileProcessor.Metrics- Returns:
- the Metric array
-
getShapes
Gets the array of availableProfileProcessor.Shapes- Returns:
- the Shape array
-
setMetric
Sets the metric to be computed for each local neighborhood. This setting is ignored if usingProfileProcessor.Shape.NONE.- Parameters:
metric-
-
setShape
Sets the shape to be iterated.- Parameters:
shape-
-
setRadius
public void setRadius(int radius) Specify a fixed radius for eachProfileProcessor.Shaperegion around eachPointInImage. Set to <= 0 to use the actualPointInImageradii.- Parameters:
radius-
-
getValues
public double[] getValues()The profile values, or null if they have not been processed yet.- Returns:
- the values
-
getRawValues
Gets the raw values for each node at the specified step interval.- Parameters:
nodeStep- the step interval between nodes- Returns:
- a map of node indices to their raw values
-
process
public void process()Processes the profile data by calling the computation. -
call
public double[] call()Process and return the profile values.- Specified by:
callin interfaceCallable<T extends net.imglib2.type.numeric.RealType<T>>- Returns:
- the values.
- Throws:
ArrayIndexOutOfBoundsException- if using CENTERLINE shape and any Path nodes are outside the bounds of the image
-
profilePathNodes
public static <T extends net.imglib2.type.numeric.RealType<T>> double[] profilePathNodes(net.imglib2.RandomAccessible<T> rai, Path path, double[] values) Get the intensities for the point coordinates of a Path- Type Parameters:
T-- Parameters:
rai- the imagepath- the Path to profilevalues- the array to store the values- Returns:
- the value array
- Throws:
ArrayIndexOutOfBoundsException- if the Path contains any points outside the image bounds
-
main
-