classPiiImageConversionSwitch
#include <PiiImageConversionSwitch.h>
PiiImageConversionSwitch is an operation which convert a receiving image from the color/gray to the gray/color type if necessary.
Inherits PiiDefaultOperation
Description
Inputs
Outputs
See also
Properties
|
The type of color conversion. |
Public types
|
enum
|
{ RgbToGrayMean }
Supported color conversion schemes. |
Constructors and destructor
Public member functions
|
( )
|
|
|
void
|
|
Protected member functions
|
virtual void
|
(
Checks the operation for execution. |
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
ColorConversion colorConversion
[read, write]The type of color conversion.
The default value is
RgbToGrayMean.
Enumeration details
-
enum ColorConversion
Supported color conversion schemes.
-
RgbToGrayMean- calculate the mean of three color channels. Retains the type of color channels, but outputs a gray-level image.
-
Function details
-
PiiImageConversionSwitch
() -
ColorConversion colorConversion
() -
void setColorConversion
-
virtual void check
(- bool reset
[protected, 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.
-
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.