classPiiColorChannelSetter
#include <PiiColorChannelSetter.h>
Sets indidivual color channels in images.
Inherits PiiDefaultOperation
Description
Inputs
Outputs
image is connected, the output will be the same
type. Otherwise, if channel3 is connected, or if the
defaultValue3 property is set to a valid number, the
output image will have four color channels. Otherwise, there will
be three channels. The data type of the output channels is the same
as that of the first connected channel input.
Properties
|
double
|
Default value for color channel 0. |
|
double
|
Default value for color channel 1. |
|
double
|
Default value for color channel 2. |
|
double
|
Default value for color channel 3. |
Constructors and destructor
Public member functions
|
virtual void
|
(
Checks the operation for execution. |
Protected member functions
|
double
|
( )
|
|
double
|
( )
|
|
double
|
( )
|
|
double
|
( )
|
|
virtual void
|
( )
Executes one round of processing. |
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
Property details
-
double defaultValue0
[read, write]Default value for color channel 0.
If the
channel0input is not connected and this value is notNaN, the whole channel will be set to this value. The default value isNaN. -
double defaultValue1
[read, write]Default value for color channel 1.
See defaultValue0.
-
double defaultValue2
[read, write]Default value for color channel 2.
See defaultValue0.
-
double defaultValue3
[read, write]Default value for color channel 3.
See defaultValue0.
Function details
-
PiiColorChannelSetter
() -
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.
-
double defaultValue0
()[protected] -
double defaultValue1
()[protected] -
double defaultValue2
()[protected] -
double defaultValue3
()[protected] -
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.
-
void setDefaultValue0
(- double defaultValue0
[protected] -
void setDefaultValue1
(- double defaultValue1
[protected] -
void setDefaultValue2
(- double defaultValue2
[protected] -
void setDefaultValue3
(- double defaultValue3
[protected]
Add a note
Not a single note added yet. Be the first, add yours.