Into

Modules

Documentation

classPiiImageRotationOperation

#include <PiiImageRotationOperation.h>

Rotate images to arbitrary angles in two dimension.

Inherits PiiDefaultOperation

Description

Inputs

imagethe input image. Any primitive type matrix.

anglerotation angle (radians, clockwise). This input is optional. If it is not connected, the angle property will be used.

Outputs

imagerotated image

Properties

double

Rotation angle in radians, measured clockwise.

double

Rotation angle in degrees.

The color used for the parts of the output image that are outside of the input image.

How to handle the size of the result.

Constructors and destructor

Public member functions

double
( )
double
( )
void
(
  • double angle
)
void
(
  • double angleDeg
)
void
(
  • const QColor & backgroundColor
)
void

Protected member functions

virtual void
( )

Executes one round of processing.

Property details

  • double angle

    [read, write]

    Rotation angle in radians, measured clockwise.

    This value is used only if the angle input is not connected. Default is 0.

  • double angleDeg

    [read, write]

    Rotation angle in degrees.

  • QColor backgroundColor

    [read, write]

    The color used for the parts of the output image that are outside of the input image.

    The default color is black.

  • PiiImage::TransformedSize transformedSize

    [read, write]

    How to handle the size of the result.

    Default is ExpandAsNecessary.

    PiiImage::TransformedSize

Function details

  • PiiImageRotationOperation

    ()
  • double angle

    ()
  • double angleDeg

    ()
  • QColor backgroundColor

    ()
  • void setAngle

    (
    • double angle
    )
  • void setAngleDeg

    (
    • double angleDeg
    )
  • void setBackgroundColor

    (
    • const QColor & backgroundColor
    )
  • void setTransformedSize

    ()
  • PiiImage::TransformedSize transformedSize

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