Into

Modules

Documentation

classPiiHistogramBackProjector

#include <PiiHistogramBackProjector.h>

Perform histogram back-projection.

Inherits PiiDefaultOperation

Description

In histogram back-projection, the pixels in an input image are replaced with values in a model histogram.

Inputs

imageinput image. Any integer-valued one-channel (i.e. gray-level) image.
channel0alias for image. More intuitive to the programmer with two-dimensional backprojection.
channel1optional input that is used only with two-dimensional backprojection.
modeloptional input for a changing model histogram. Overrides model if connected.

Outputs

imagebackprojected image. Type depends on the model.
See also

Properties

The model histogram.

Constructors and destructor

Public member functions

virtual PiiInputSocket *
( )

Maps channel0 to image.

( )
void
( )

Protected member functions

virtual void
(
  • bool reset
)

Checks the operation for execution.

virtual void

Executes one round of processing.

Property details

  • PiiVariant model

    [read, write]

    The model histogram.

    Any matrix will do. The output type is determined by the type of the model histogram. Typically, the model is a PiiMatrix<int> or a PiiMatrix<bool>.

Function details

  • PiiHistogramBackProjector

    ()
  • virtual PiiInputSocket * input

    ( )
    [virtual]

    Maps channel0 to image.

    Reimplemented from PiiBasicOperation.

  • PiiVariant model

    ()
  • void setModel

    ( )
  • 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.

Notes (0)

Add a note

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