Package sc.fiji.snt.analysis
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
Command to retrieve node profiles (plots of voxel intensities sampled across
Path nodes).
- Author:
- Tiago Ferreira
-
Field Summary
Fields inherited from class sc.fiji.snt.gui.cmds.CommonDynamicCmd
EMPTY_LABEL, HEADER_HTML, snt, sntService, statusService, ui, uiServiceFields inherited from class org.scijava.command.DynamicCommand
moduleService, pluginService -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor used by CommandService before callingrun().NodeProfiler(net.imagej.Dataset dataset) Instantiates a new Profiler. -
Method Summary
Modifier and TypeMethodDescriptionij.gui.Plotij.gui.PlotGets the profile for the specified path as a map of lists of pixel intensities (profile indices as keys)Gets the profile for the specified path as a map of lists of pixel intensities (profile indices as keys)static voidvoidrun()voidsetNodeStep(int nodeStep) voidsetRadius(int radius) voidsetShape(ProfileProcessor.Shape shape) Sets the shape of the iterating cursor.Methods inherited from class sc.fiji.snt.gui.cmds.CommonDynamicCmd
cancel, cancel, error, getPromptWithCloseHandler, getPromptWithCloseHandler, init, isCanceled, msg, notifyExternalDataLoaded, notifyLoadingEnd, notifyLoadingStart, resetUI, resetUI, resetUI, statusMethods inherited from class org.scijava.command.DynamicCommand
context, getCancelReason, getContext, getInfo, getInput, getOutput, saveInputs, setContext, setInput, setOutput, uncancelMethods inherited from class org.scijava.module.AbstractModule
getDelegateObject, getInputs, getOutputs, initialize, isInputResolved, isOutputResolved, preview, resolveInput, resolveOutput, setInputs, setOutputs, unresolveInput, unresolveOutputMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.scijava.module.Module
getDelegateObject, getInputs, getOutputs, initialize, isInputResolved, isOutputResolved, isResolved, preview, resolveInput, resolveOutput, setInputs, setOutputs, setResolved, unresolveInput, unresolveOutputMethods inherited from interface org.scijava.module.MutableModule
addInput, addInput, addOutput, addOutput, removeInput, removeOutput
-
Constructor Details
-
NodeProfiler
public NodeProfiler()Empty constructor used by CommandService before callingrun(). 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:
runin interfaceorg.scijava.module.MutableModule- Specified by:
runin interfaceRunnable- Overrides:
runin classCommonDynamicCmd
-
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 profiledchannel- the channel to be profiled (0-based index)frame- the frame to be profiled (0-based index)- Returns:
- The profile
- Throws:
ArrayIndexOutOfBoundsException
-
getPlot
- 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
- Parameters:
path- the path to be profiledchannel- the channel to be profiled (0-based index)- Returns:
- The profile (Mean±SD of all the profiled data)
-
getTable
- 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
- Parameters:
path- the path to be profiled, using its CT positions in the imagechannel- the channel to be profiled (0-based index)- Returns:
- the profiled raw data in tabular form (1 column-per profiled node)
-
setShape
Sets the shape of the iterating cursor.- Parameters:
shape- AProfileProcessor.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
-