SoHExtremaWatershedProcessing engine computes the watershed lines of a grayscale image. More...
#include <ImageViz/Engines/ImageSegmentation/SeparatingAndFilling/SoHExtremaWatershedProcessing.h>
Public Types | |
enum | ObjectLightness { DARK_OBJECTS = 0, BRIGHT_OBJECTS = 1 } |
enum | SeparationMode { SEPARATED_OBJECTS = 0, WATERSHED_RIDGES = 1, SEPARATED_BASINS = 2, CONTIGUOUS_BASINS = 3 } |
enum | AlgorithmMode { REPEATABLE = 0, FAST = 1 } |
Public Member Functions | |
SoHExtremaWatershedProcessing () | |
Public Attributes | |
SoSFEnum | computeMode |
SoSFEnum | neighborhood3d |
SoSFImageDataAdapter | inGrayImage |
SoSFEnum | objectLightness |
SoSFEnum | separationMode |
SoSFEnum | algorithmMode |
SoSFInt32 | contrastValue |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outSeparationImage |
This engine computes the watershed lines of a grayscale image. It directly uses the image for black objects and the inverted image for white objects. You can adjust the contrast level which is used to reduce the number of markers for the watershed process.
This engine is a high-level combination of watershed, distance transform and numerical reconstruction algorithms. There is a limitation to the separating ability: if some particles overlap too much, they will not be separated. This engine can be used on the gradient modulus to compute best-fit contours.
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. |
computeMode | MODE_AUTO |
neighborhood3d | CONNECTIVITY_26 |
inGrayImage | NULL |
objectLightness | DARK_OBJECTS |
separationMode | SEPARATED_OBJECTS |
algorithmMode | REPEATABLE |
contrastValue | 30 |
SoHExtremaWatershedProcessing::SoHExtremaWatershedProcessing | ( | ) |
Constructor.
Select the algorithm mode for fastwatershed.
Use enum AlgorithmMode. Default is REPEATABLE
Select the compute Mode (2D or 3D or AUTO) Use enum ComputeMode.
Default is MODE_AUTO
The depth of valley.
Default value is 30.
The input grayscale image.
Default value is NULL. Supported types include: grayscale image.
In 3D configuration (see computeMode), the neighborhood connectivity defines the connectivity considered for processing adjacent voxels.
Use enum Neighborhood3d. Default is CONNECTIVITY_26.
Select the lightness mode for object to separate.
Use enum ObjectLightness. Default is DARK_OBJECTS
SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter*> SoHExtremaWatershedProcessing::outSeparationImage |
The output separation (binary or label) image.
Default value is NULL. Supported types include: grayscale binary label color image.
Select the output image type: separation lines, split objects or separated basins.
Use enum SeparationMode. Default is SEPARATED_OBJECTS