Class NodeProfiler

java.lang.Object
org.scijava.module.AbstractModule
org.scijava.module.DefaultMutableModule
org.scijava.command.DynamicCommand
sc.fiji.snt.gui.cmds.CommonDynamicCmd
sc.fiji.snt.analysis.NodeProfiler
All Implemented Interfaces:
Runnable, org.scijava.Cancelable, org.scijava.command.Command, org.scijava.Contextual, org.scijava.module.Module, org.scijava.module.MutableModule, org.scijava.plugin.SciJavaPlugin

public class NodeProfiler extends CommonDynamicCmd
Command to retrieve node profiles (plots of voxel intensities sampled across Path nodes).
Author:
Tiago Ferreira
  • Constructor Details

    • NodeProfiler

      public NodeProfiler()
      Empty constructor used by CommandService before calling run(). Should not be called directly.
    • NodeProfiler

      public NodeProfiler(net.imagej.Dataset dataset)
      Instantiates a new Profiler.
      Parameters:
      dataset - the image from which pixel intensities will be retrieved. Note that no effort is made to ensure that the image is suitable for profiling.
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface org.scijava.module.MutableModule
      Specified by:
      run in interface Runnable
      Overrides:
      run in class CommonDynamicCmd
    • getValues

      public <T extends net.imglib2.type.numeric.RealType<T>> SortedMap<Integer,List<Double>> getValues(Path p)
      Gets the profile for the specified path as a map of lists of pixel intensities (profile indices as keys)
      Parameters:
      p - the path to be profiled, using its CT positions in the image
      Returns:
      The profile
    • getValues

      public <T extends net.imglib2.type.numeric.RealType<T>> SortedMap<Integer,List<Double>> getValues(Path p, int channel, int frame) throws ArrayIndexOutOfBoundsException
      Gets the profile for the specified path as a map of lists of pixel intensities (profile indices as keys)
      Parameters:
      p - the path to be profiled
      channel - the channel to be profiled (0-based index)
      frame - the frame to be profiled (0-based index)
      Returns:
      The profile
      Throws:
      ArrayIndexOutOfBoundsException
    • getPlot

      public ij.gui.Plot getPlot(Path path)
      Parameters:
      path - the path to be profiled, using its CT positions in the image
      Returns:
      The profile (Mean±SD of all the profiled data)
    • getPlot

      public ij.gui.Plot getPlot(Path path, int channel)
      Parameters:
      path - the path to be profiled
      channel - the channel to be profiled (0-based index)
      Returns:
      The profile (Mean±SD of all the profiled data)
    • getTable

      public SNTTable getTable(Path path)
      Parameters:
      path - the path to be profiled, using its CT positions in the image
      Returns:
      the profiled raw data in tabular form (1 column-per profiled node)
    • getTable

      public SNTTable getTable(Path path, int channel)
      Parameters:
      path - the path to be profiled, using its CT positions in the image
      channel - the channel to be profiled (0-based index)
      Returns:
      the profiled raw data in tabular form (1 column-per profiled node)
    • setShape

      public void setShape(ProfileProcessor.Shape shape)
      Sets the shape of the iterating cursor.
      Parameters:
      shape - A ProfileProcessor.Shape
    • setRadius

      public void setRadius(int radius)
      Parameters:
      radius - the radius (in pixels) of sampling shape
    • setNodeStep

      public void setNodeStep(int nodeStep)
      Parameters:
      nodeStep - sets the sampling frequency. I.e., if 10, each 10th node is sampled.
    • main

      public static void main(String[] args)