IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
TransformationModule Class Reference

#include <peak_icv/pipeline/detail/peak_icv_transformation_module.hpp>

Inheritance diagram for TransformationModule:

Public Member Functions

 TransformationModule ()=default
 Creates a TransformationModule module with default values for mirror and rotation.
 
 ~TransformationModule () override=default
 
 TransformationModule (const TransformationModule &other)=delete
 Copy constructor for class TransformationModule is deleted.
 
 TransformationModule (TransformationModule &&other) noexcept
 
TransformationModule & operator= (const TransformationModule &other)=delete
 Copy assignment for class TransformationModule is deleted.
 
TransformationModule & operator= (TransformationModule &&other) noexcept
 
void Serialize (peak::common::serialization::IArchive &archive) const override
 Serializes the object's internal state into the provided archive.
 
void Deserialize (const peak::common::serialization::IArchive &archive) override
 Restores the object's state from the provided archive.
 
void SetEnabled (bool enabled) override
 Sets the enabled state of this module.
 
bool IsEnabled () const override
 Checks if the module is currently enabled.
 
const char * GetType () const override
 Returns the type of the module for serialization purposes.
 
void ResetToDefault () override
 Resets all settings to the default values for mirror and rotation.
 
void SetMirrorLeftRightEnabled (bool enabled)
 Sets whether the image should be mirrored left-right.
 
void SetMirrorUpDownEnabled (bool enabled)
 Sets whether the image should be mirrored up-down.
 
bool IsMirrorLeftRightEnabled () const
 Gets the current left-right mirroring setting.
 
bool IsMirrorUpDownEnabled () const
 Gets the current up-down mirroring setting.
 
void SetRotationAngle (Rotation angle)
 Sets the desired rotation angle.
 
Rotation GetRotationAngle () const
 Gets the current rotation angle.
 
peak::icv::Image Process (const peak::icv::Image &input) const
 Processes the input image and returns a mirrored and/or rotated copy based on current settings.
 
peak::common::Any Process (const peak::common::Any &input) const override
 Processes the input image and returns a mirrored and/or rotated copy based on current settings.
 

Detailed Description

Transformation is an image pipeline module that provides mirror and rotation functionality.

See also
features::MirrorFeature and features::RotationFeature

Definition at line 40 of file peak_icv_transformation_module.hpp.

Constructor & Destructor Documentation

◆ TransformationModule() [1/3]

TransformationModule ( )
default

Creates a TransformationModule module with default values for mirror and rotation.

Since
ids_peak_icv 1.0

◆ ~TransformationModule()

~TransformationModule ( )
overridedefault
Since
ids_peak_icv 1.0

◆ TransformationModule() [2/3]

TransformationModule ( const TransformationModule & other)
delete

Copy constructor for class TransformationModule is deleted.

Note
If you need to copy a module, you can create a new one and copy the parameters via Serialize() and Deserialize().
Since
ids_peak_icv 1.0

◆ TransformationModule() [3/3]

TransformationModule ( TransformationModule && other)
inlinenoexcept
Since
ids_peak_icv 1.0

Definition at line 411 of file peak_icv_transformation_module.hpp.

Member Function Documentation

◆ Deserialize()

void Deserialize ( const peak::common::serialization::IArchive & archive)
inlineoverridevirtual

Restores the object's state from the provided archive.

This function reads and applies all necessary parameters from the given archive to reconstruct the internal state of the object. It ensures that the object is restored to a valid and consistent state.

Parameters
archiveThe source archive containing the serialized parameters.
Exceptions
CorruptedExceptionIf Archive is malformed, misses keys or the values are invalid
NotSupportedExceptionIf the 'Version' entry indicates an unsupported version or if the rotation angle is not transformable into peak::pipeline::Rotation.
Note
This function requires that the archive contains all expected fields as produced by a corresponding Serialize() call.
Since
ids_peak_icv 1.0

Implements ISerializable.

Definition at line 453 of file peak_icv_transformation_module.hpp.

◆ GetRotationAngle()

Rotation GetRotationAngle ( ) const
inline

Gets the current rotation angle.

Returns
The currently configured rotation angle.
Since
ids_peak_icv 1.0

Definition at line 511 of file peak_icv_transformation_module.hpp.

◆ GetType()

const char * GetType ( ) const
inlineoverridevirtual

Returns the type of the module for serialization purposes.

Returns
A string representing the module's type.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 406 of file peak_icv_transformation_module.hpp.

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Checks if the module is currently enabled.

Returns
True if the module is enabled, false otherwise.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 401 of file peak_icv_transformation_module.hpp.

◆ IsMirrorLeftRightEnabled()

bool IsMirrorLeftRightEnabled ( ) const
inline

Gets the current left-right mirroring setting.

Returns
True if left-right mirroring is enabled so that left and right will be flipped.
Since
ids_peak_icv 1.0

Definition at line 492 of file peak_icv_transformation_module.hpp.

◆ IsMirrorUpDownEnabled()

bool IsMirrorUpDownEnabled ( ) const
inline

Gets the current up-down mirroring setting.

Returns
True if up-down mirroring is enabled so that up and down will be flipped.
Since
ids_peak_icv 1.0

Definition at line 497 of file peak_icv_transformation_module.hpp.

◆ operator=() [1/2]

TransformationModule & operator= ( const TransformationModule & other)
delete

Copy assignment for class TransformationModule is deleted.

Note
If you need to copy a module, you can create a new one and copy the parameters via Serialize() and Deserialize().
Since
ids_peak_icv 1.0

◆ operator=() [2/2]

TransformationModule & operator= ( TransformationModule && other)
inlinenoexcept
Since
ids_peak_icv 1.0

Definition at line 420 of file peak_icv_transformation_module.hpp.

◆ Process() [1/2]

peak::common::Any Process ( const peak::common::Any & input) const
inlineoverridevirtual

Processes the input image and returns a mirrored and/or rotated copy based on current settings.

Supported pixel formats
  • BayerGR8
  • BayerGR10
  • BayerGR12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • Confidence8
  • Confidence16
  • Coord3D_C8
  • Coord3D_C16
  • Coord3D_C32f
  • Coord3D_ABC32f
  • RGB8
  • RGB10
  • RGB12
  • BGR8
  • BGR10
  • BGR12
  • RGBa8
  • RGBa10
  • RGBa12
  • BGRa8
  • BGRa10
  • BGRa12
  • Mono32fIDS
  • RGB32fIDS

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

Note
When processing images with a Bayer pattern, the result may have a different pixel format, though the bit depth remains unchanged.
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed.
Returns
A new image object that is the transformed result of the input.
Exceptions
peak::common::InvalidCastExceptionIf the input cast to peak::icv::Image failed.
NotSupportedExceptionIf image has any other than the supported pixel formats.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 521 of file peak_icv_transformation_module.hpp.

◆ Process() [2/2]

peak::icv::Image Process ( const peak::icv::Image & input) const
inline

Processes the input image and returns a mirrored and/or rotated copy based on current settings.

Supported pixel formats
  • BayerGR8
  • BayerGR10
  • BayerGR12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • Confidence8
  • Confidence16
  • Coord3D_C8
  • Coord3D_C16
  • Coord3D_C32f
  • Coord3D_ABC32f
  • RGB8
  • RGB10
  • RGB12
  • BGR8
  • BGR10
  • BGR12
  • RGBa8
  • RGBa10
  • RGBa12
  • BGRa8
  • BGRa10
  • BGRa12
  • Mono32fIDS
  • RGB32fIDS

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

Note
When processing images with a Bayer pattern, the result may have a different pixel format, though the bit depth remains unchanged.
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed.
Returns
A new image object that is the transformed result of the input.
Exceptions
NotSupportedExceptionIf image has any other than the supported pixel formats.
Since
ids_peak_icv 1.0

Definition at line 516 of file peak_icv_transformation_module.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets all settings to the default values for mirror and rotation.

Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 475 of file peak_icv_transformation_module.hpp.

◆ Serialize()

void Serialize ( peak::common::serialization::IArchive & archive) const
inlineoverridevirtual

Serializes the object's internal state into the provided archive.

This function populates the given archive with all parameters required to fully represent the current state of the object. It ensures that the object can be reconstructed or transmitted accurately by saving all relevant data members in a consistent and structured format.

Parameters
archiveThe target archive that will store the serialized parameters.
Since
ids_peak_icv 1.0

Implements ISerializable.

Definition at line 434 of file peak_icv_transformation_module.hpp.

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Sets the enabled state of this module.

Parameters
enabledIf true, the module is enabled; otherwise, it is disabled.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 395 of file peak_icv_transformation_module.hpp.

◆ SetMirrorLeftRightEnabled()

void SetMirrorLeftRightEnabled ( bool enabled)
inline

Sets whether the image should be mirrored left-right.

Parameters
enabledIf true, the image will be mirrored along the vertical axis.
Since
ids_peak_icv 1.0

Definition at line 482 of file peak_icv_transformation_module.hpp.

◆ SetMirrorUpDownEnabled()

void SetMirrorUpDownEnabled ( bool enabled)
inline

Sets whether the image should be mirrored up-down.

Parameters
enabledIf true, the image will be mirrored along the horizontal axis.
Since
ids_peak_icv 1.0

Definition at line 487 of file peak_icv_transformation_module.hpp.

◆ SetRotationAngle()

void SetRotationAngle ( Rotation angle)
inline

Sets the desired rotation angle.

Parameters
angleThe rotation angle to apply (see Rotation enum).
Since
ids_peak_icv 1.0

Definition at line 502 of file peak_icv_transformation_module.hpp.