classPiiLabelingOperation
#include <PiiLabelingOperation.h>
Basic labeling operations.
Inherits PiiDefaultOperation
Description
Inputs
Outputs
Properties
|
Connectivity type for labeling. |
|
|
double
|
A hysteresis for the thresholding. |
|
bool
|
A flag that can be used to invert the automatic thresholding. |
|
double
|
A static threshold value for automatic thresholding. |
Constructors and destructor
Public member functions
|
( )
|
|
|
double
|
( )
|
|
bool
|
( )
|
|
void
|
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
double
|
( )
|
Protected member functions
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
PiiImage::Connectivity connectivity
[read, write]Connectivity type for labeling.
The default is
Connect4. -
double hysteresis
[read, write]A hysteresis for the thresholding.
If this value is non-zero,
thresholdwill decide the minimum value for a gray level that can be a "seed" for a connected object. A all pixels surrounding the seed that are brighter thanthreshold-hysteresisare joined to the connected component. -
bool inverse
[read, write]A flag that can be used to invert the automatic thresholding.
If this value is set to
true, dark objects will be considered targets. The default value isfalse. -
double threshold
[read, write]A static threshold value for automatic thresholding.
Every pixel whose gray level is higher than this value will be considered an object. The default value is zero.
Function details
-
PiiLabelingOperation
() -
PiiImage::Connectivity connectivity
() -
double hysteresis
() -
bool inverse
() -
void setConnectivity
-
void setHysteresis
(- double hysteresis
-
void setInverse
(- bool inverse
-
void setThreshold
(- double threshold
-
double threshold
() -
virtual void process
()[protected, virtual]Executes one round of processing.
This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.
Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().
Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns
Running.Exceptions
- PiiExecutionException
-
whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.
Reimplemented from PiiDefaultOperation.
Add a note
Not a single note added yet. Be the first, add yours.