public class PathProfiler
extends org.scijava.command.ContextCommand
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
X_VALUES
Flag for retrieving distances from
getValues(Path) |
static java.lang.String |
Y_VALUES
Flag for retrieving intensities from
getValues(Path) |
Constructor and Description |
---|
PathProfiler(Path path,
ij.ImagePlus imp)
Instantiates a new Profiler from a single path
|
PathProfiler(Tree tree,
ij.ImagePlus imp)
Instantiates a new Profiler
|
Modifier and Type | Method and Description |
---|---|
void |
assignValues()
Calls
assignValues(Path) on the Paths of the profiled Tree |
void |
assignValues(Path p)
Retrieves pixel intensities at each node of the Path storing them as Path
values |
ij.gui.Plot |
getPlot()
Gets the plot profile as an IJ1
Plot . |
java.util.Map<java.lang.String,java.util.List<java.lang.Double>> |
getValues(Path p)
Gets the profile for the specified path as a map of lists, with distances
stored under
X_VALUES ("x-values") and intensities under
Y_VALUES ("y-values"). |
net.imagej.plot.XYPlot |
getXYPlot()
Gets the plot profile as an
PlotService plot. |
static void |
main(java.lang.String[] args) |
void |
run() |
void |
setNodeIndicesAsDistances(boolean nodeIndices)
Sets whether the profile abscissae should be reported in real-word units
(the default) or node indices (zero-based).
|
boolean |
validImage()
Checks whether the specified image contains all the nodes of the profiled
Tree/Path.
|
public static final java.lang.String X_VALUES
getValues(Path)
public static final java.lang.String Y_VALUES
getValues(Path)
public PathProfiler(Tree tree, ij.ImagePlus imp)
tree
- the Tree to be profiledimp
- the image from which pixel intensities will be retrieved. Note
that no effort is made to ensure that the image is suitable for
profiling, if Tree nodes lay outside the image dimensions, pixels
intensities will be retrieved as Float#NaN
public PathProfiler(Path path, ij.ImagePlus imp)
path
- the path to be profiledimp
- the image from which pixel intensities will be retrieved. Note
that no effort is made to ensure that the image is suitable for
profiling, if Tree nodes lay outside the image dimensions, pixels
intensities will be retrieved as Float#NaN
public void run()
public boolean validImage()
public void assignValues()
assignValues(Path)
on the Paths of the profiled Treepublic void assignValues(Path p)
values
p
- the Path to be profiledPath.setNodeValues(double[])
public void setNodeIndicesAsDistances(boolean nodeIndices)
getValues(Path)
, getPlot()
or getXYPlot()
.nodeIndices
- If true, distances will be reported as indices.public java.util.Map<java.lang.String,java.util.List<java.lang.Double>> getValues(Path p)
X_VALUES
("x-values") and intensities under
Y_VALUES
("y-values").p
- the path to be profiledpublic ij.gui.Plot getPlot()
Plot
.public net.imagej.plot.XYPlot getXYPlot()
PlotService
plot. Requires
Contextual.setContext(org.scijava.Context)
to be called beforehand.public static void main(java.lang.String[] args)