public class SkeletonConverter extends Object
Tree
s from a skeletonized ImagePlus
.Skeletonize3D_
,
AnalyzeSkeleton_
Constructor and Description |
---|
SkeletonConverter(ij.ImagePlus imagePlus) |
SkeletonConverter(ij.ImagePlus imagePlus,
boolean skeletonize) |
Modifier and Type | Method and Description |
---|---|
List<DirectedWeightedGraph> |
getGraphs()
Generates a list of
DirectedWeightedGraph s from the skeleton image. |
List<Tree> |
getTrees()
Generates a list of
Tree s from the skeleton image. |
static void |
main(String[] args) |
void |
setConnectComponents(boolean connectComponents)
Whether to merge broken components in the skeleton result
|
void |
setLengthThreshold(double lengthThreshold)
The minimum component length necessary to avoid pruning.
|
void |
setMaxConnectDist(double maxConnectDist)
The maximum allowable distance between nearest neighbors to be considered for a merge
|
void |
setOrigIP(ij.ImagePlus origIP)
Sets the original
ImagePlus to be used during voxel-based loop pruning. |
void |
setPruneByLength(boolean pruneByLength)
Sets whether or not to prune components below a threshold length from the result.
|
void |
setPruneEnds(boolean pruneEnds)
Sets whether or not to prune branches which end in end-points from the result.
|
void |
setPruneMode(int pruneMode)
Sets the loop pruning strategy.
|
void |
setShortestPath(boolean shortestPath)
Sets whether or not to calculate the longest shortest-path in the skeleton result.
|
void |
setSilent(boolean silent)
Setting this to false will display both the tagged skeleton image and the shortest path image (if the
shortest path calculation is enabled).
|
void |
setVerbose(boolean verbose) |
static void |
skeletonize(ij.ImagePlus imp)
Convenience method to skeletonize an 8-bit image using
Skeletonize3D_ . |
public SkeletonConverter(ij.ImagePlus imagePlus)
imagePlus
- The image to be parsed. It is expected to be a topological
skeleton (non-zero foreground) (conversion will be
nonsensical otherwise).public SkeletonConverter(ij.ImagePlus imagePlus, boolean skeletonize) throws IllegalArgumentException
imagePlus
- The image to be parsed. It is expected to be binary
(non-zero foreground).skeletonize
- If true, image will be skeletonized using
Skeletonize3D_
_in place_ prior to the analysis.
Conversion will be nonsensical if false
and
imagePlus
is not a topological skeletonIllegalArgumentException
- if skeletonize
is true and
imagePlus
is not binary.public static void skeletonize(ij.ImagePlus imp)
Skeletonize3D_
.imp
- The 8-bit image to be skeletonized. All non-zero values are
considered to be foreground.public List<Tree> getTrees()
Tree
s from the skeleton image.
Each Tree corresponds to one connected component of the graph returned by SkeletonResult.getGraph()
.public List<DirectedWeightedGraph> getGraphs()
DirectedWeightedGraph
s from the skeleton image.
Each graph corresponds to one connected component of the graph returned by SkeletonResult.getGraph()
.public void setOrigIP(ij.ImagePlus origIP)
ImagePlus
to be used during voxel-based loop pruning.
See AnalyzeSkeleton documentationorigIP
- the original ImagePlusAnalyzeSkeleton_.run(int, boolean, boolean, ImagePlus, boolean, boolean)
public void setPruneMode(int pruneMode)
pruneMode
- the loop prune strategy, e.g., AnalyzeSkeleton_.SHORTEST_BRANCH
,
AnalyzeSkeleton_.LOWEST_INTENSITY_BRANCH
or AnalyzeSkeleton_.LOWEST_INTENSITY_VOXEL
AnalyzeSkeleton_.run(int, boolean, boolean, ImagePlus, boolean, boolean)
public void setPruneEnds(boolean pruneEnds)
public void setShortestPath(boolean shortestPath)
public void setSilent(boolean silent)
public void setVerbose(boolean verbose)
public void setPruneByLength(boolean pruneByLength)
public void setLengthThreshold(double lengthThreshold)
pruneByLength
is true.lengthThreshold
- the length thresholdsetPruneByLength(boolean)
public void setConnectComponents(boolean connectComponents)
connectComponents
- setMaxConnectDist(double)
public void setMaxConnectDist(double maxConnectDist)
maxConnectDist
- setConnectComponents(boolean)
public static void main(String[] args)
Copyright © 2015–2021 Fiji. All rights reserved.