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
  • Constructor Details

    • ProfileProcessor

      public ProfileProcessor(net.imglib2.RandomAccessibleInterval<T> rai, Path path)
  • Method Details

    • getMetrics

      public static ProfileProcessor.Metric[] getMetrics()
      Gets the array of available ProfileProcessor.Metrics
      Returns:
      the Metric array
    • getShapes

      public static ProfileProcessor.Shape[] getShapes()
      Gets the array of available ProfileProcessor.Shapes
      Returns:
      the Shape array
    • setMetric

      public void setMetric(ProfileProcessor.Metric metric)
      Sets the metric to be computed for each local neighborhood. This setting is ignored if using ProfileProcessor.Shape.NONE.
      Parameters:
      metric -
    • setShape

      public void setShape(ProfileProcessor.Shape shape)
      Sets the shape to be iterated.
      Parameters:
      shape -
    • setRadius

      public void setRadius(int radius)
      Specify a fixed radius for each ProfileProcessor.Shape region around each PointInImage. Set to <= 0 to use the actual PointInImage radii.
      Parameters:
      radius -
    • getValues

      public double[] getValues()
      The profile values, or null if they have not been processed yet.
      Returns:
      the values
    • getRawValues

      public SortedMap<Integer,List<Double>> getRawValues(int nodeStep)
      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:
      call in interface Callable<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 image
      path - the Path to profile
      values - the array to store the values
      Returns:
      the value array
      Throws:
      ArrayIndexOutOfBoundsException - if the Path contains any points outside the image bounds
    • main

      public static void main(String[] args)