SoCenterLineApproximation3d engine More...
#include <ImageViz/Engines/ImageSegmentation/ComputationalGeometry/SoCenterLineApproximation3d.h>
The engine extracts the centerline of a binary image. A centerline is a path with a tree topology that approximates the input shape. The extraction procedure enforces the path to be equidistant to its boundaries.
The engine searches for a graph with tree topology (without loops). If the object contains loops this algorithms will not fail, instead it will just ignore certain connectivity so that the tree topology of graph is preserved.
The engine searches iteratively for the longest branch that can be added to the tree.
inBinaryImage | NULL |
autoMode | FALSE |
numberOfBranches | 1 |
newBranchSensibility | 3.0 |
distanceMapSmoothing | 0.3 |
smoothingIteration | 3 |
Notice: This engine requires to preliminarily load the whole input data set into memory to be computed. As a consequence the input data set will be automatically loaded before the execution of this engine, ignoring the maximum memory parameter of the SbImageDataAdapterHelper::getAppropriateAdapter function or SoFileDataAdapter class If the input data set cannot fit in memory, this engine will fail during its computation. |
SoCenterLineApproximation3d::SoCenterLineApproximation3d | ( | ) |
Constructor.
If this parameter is set to true the number of branches is computed automatically (the parameter newBranchSensibility controls the adding of new branches) otherwise branches are added until numberOfBranches connections is reached.
Default value is false.
This parameter controls the smoothing of the distance map which is computed internally to make the tree centered.
Smoothing of the distance map can be useful when the distance map is not sufficiently smooth ( generally it leads to oscillation in the tree ). The filter is a Gaussian filter of standard deviation euclideanDistanceMapSigmaSmoothing. Default value is 0.3.
Input label image.
One centerline will be extracted by label. Default is NULL.
This parameter controls the adding of a new branch in the tree in automatic mode.
A new branch is added to the tree only if its length (b in scheme) is newBranchSensibility time farther than the closest boundary point at junction (a in scheme). Default value is 3.0.
Figure 1: New branch sensibility
Number of branches iteratively added to the reconstructed centerline tree.
This parameter is not used if autoMode is set to true. Default value is 1.
SoImageVizEngineOutput<SoSFImageDataAdapter, SoImageDataAdapter*> SoCenterLineApproximation3d::outBinaryImage |
Output centerline.
The resulting image is a binary image that represents the extracted centerline. Default value is NULL.
SoImageVizEngineOutput<SoSFFieldContainer, SoIndexedLineSet*> SoCenterLineApproximation3d::outLineSet |
Output line set.
This output is the geometric counterpart of the output binary image. Default value is NULL.
Number of smoothing iteration of the output line set (post processing).
A smoothing iteration applies a mean filter of size 3 on vertices. Default value is 3.