Into

Modules

Documentation

classPiiColorChannelSetter

#include <PiiColorChannelSetter.h>

Sets indidivual color channels in images.

Inherits PiiDefaultOperation

Description

Inputs

imagea color image to which color channels are to be set. Optional. If this input is not connected, the output will be composed of the individual color channels.
channelXindividual color channels as intensity images. X ranges from 0 to 3 (0 = red, 1 = blue, 2 = green, 3 = alpha in RGBA).
All inputs are optional, but at least one of them must be connected.

Outputs

imageresult image. If 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
(
  • bool reset
)

Checks the operation for execution.

Protected member functions

double
double
double
double
virtual void

Executes one round of processing.

void
(
  • double defaultValue0
)
void
(
  • double defaultValue1
)
void
(
  • double defaultValue2
)
void
(
  • double defaultValue3
)

Property details

  • double defaultValue0

    [read, write]

    Default value for color channel 0.

    If the channel0 input is not connected and this value is not NaN, the whole channel will be set to this value. The default value is NaN.

  • double defaultValue1

    [read, write]

    Default value for color channel 1.

  • double defaultValue2

    [read, write]

    Default value for color channel 2.

  • double defaultValue3

    [read, write]

    Default value for color channel 3.

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]
Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.