classPiiColorCorrelogramOperation
#include <PiiColorCorrelogramOperation.h>
Calculate the color autocorrelogram of an image.
Inherits PiiDefaultOperation
Description
See PiiColors::autoCorrelogram() for details.
Inputs
Outputs
Properties
|
QVariantList
|
The distances for which the color correlogram will be calculated. |
|
int
|
The number of quantization levels per each color channel for color indexing. |
|
bool
|
A flag that controls quantization of color channels input. |
Constructors and destructor
Public member functions
|
virtual void
|
(
Checks the operation for execution. |
|
QVariantList
|
( )
|
|
int
|
( )
|
|
bool
|
( )
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
Protected member functions
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
QVariantList distances
[read, write]The distances for which the color correlogram will be calculated.
The default is 1,3,5,7.
-
int levels
[read, write]The number of quantization levels per each color channel for color indexing.
Color indices for RGB images are calculated as specified in PiiColors::toIndexed(). The default value is 4. If the quantize flag is
true, color channels are quantized to this many levels before calculating the correlogram. If the quantize flag isfalse, color channel values greater than or equal tolevelswill be ignored. -
bool quantize
[read, write]
Function details
-
PiiColorCorrelogramOperation
() -
~PiiColorCorrelogramOperation
() -
virtual void check
(- bool reset
[virtual]Checks the operation for execution.
This function creates a suitable flow controller by calling createFlowController(). It then sets the flow controller to the active processor and sets the processor as the input controller for all inputs.
If you change socket groupings in your overridden implementation, please call PiiDefaultOperation::check() after that. Otherwise, your new groupings will not be in effect.
Reimplemented from PiiDefaultOperation.
-
QVariantList distances
() -
int levels
() -
bool quantize
() -
void setDistances
(- const QVariantList & distances
-
void setLevels
(- int levels
-
void setQuantize
(- bool quantize
-
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.