![]() |
IDS peak ICV v1.1.0
|

Public Member Functions | |
| None | __init__ (self) |
| Creates a transformation module. | |
| str | type (self) |
| Returns the type of the module for serialization purposes. | |
| Image | process (self, Image input) |
| Processes the input image and returns a mirrored and/or rotated copy based on current settings. | |
| None | reset_to_default (self) |
| Resets all settings to the default values: | |
| bool | mirror_left_right (self) |
| Gets the current left-right mirroring setting. | |
| None | mirror_left_right (self, bool value) |
| Sets whether the image should be mirrored left-right. | |
| bool | mirror_up_down (self) |
| Gets the current up-down mirroring setting. | |
| None | mirror_up_down (self, bool value) |
| Sets whether the image should be mirrored up-down. | |
| Rotation | rotation_angle (self) |
| Gets the current rotation angle. | |
| None | rotation_angle (self, Rotation value) |
| Sets the desired rotation angle. | |
| bool | enabled (self) |
| Checks if the module is currently enabled. | |
| None | enabled (self, bool value) |
| Sets the enabled state of this module. | |
| None | serialize (self, IArchive archive) |
| Serializes the object's internal state into an archive. | |
| None | deserialize (self, IArchive archive) |
| Restores the object's state from the provided archive. | |
Data Fields | |
| version | |
| mirror_up_down = mirror_archive.get("UpDown", bool) | |
| mirror_left_right = mirror_archive.get("LeftRight", bool) | |
| rotation_angle = Rotation(rotation_archive.get("Angle", int)) | |
Static Public Attributes | |
| bool | DEFAULT_MIRROR_LEFT_RIGHT = False |
| bool | DEFAULT_MIRROR_UP_DOWN = False |
| Rotation | DEFAULT_ROTATION_ANGLE = Rotation.NO_ROTATION |
Protected Attributes | |
| bool | _mirror_left_right = self.DEFAULT_MIRROR_LEFT_RIGHT |
| bool | _mirror_up_down = self.DEFAULT_MIRROR_UP_DOWN |
| Rotation | _rotation_angle = self.DEFAULT_ROTATION_ANGLE |
| bool | _rotation_enabled = True |
| bool | _mirror_enabled = True |
Transformation is an image pipeline module that provides mirror and rotation functionality.
Default configuration:
Definition at line 14 of file transformation_module.py.
| None __init__ | ( | self | ) |
Creates a transformation module.
Reimplemented from ModuleBase.
Definition at line 31 of file transformation_module.py.
| None deserialize | ( | self, | |
| IArchive | archive ) |
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.
| archive | The source archive containing the serialized parameters. |
| CorruptedException | If Archive is malformed, misses keys or the values are invalid |
| NotSupportedException | If the 'Version' entry indicates an unsupported version or if the rotation angle is not transformable into RotationAngle. |
Reimplemented from ModuleBase.
Definition at line 243 of file transformation_module.py.
| bool enabled | ( | self | ) |
Checks if the module is currently enabled.
Reimplemented from ModuleBase.
Definition at line 193 of file transformation_module.py.
| None enabled | ( | self, | |
| bool | value ) |
Sets the enabled state of this module.
| value | If true, the module is enabled; otherwise, it is disabled. |
Reimplemented from ModuleBase.
Definition at line 205 of file transformation_module.py.
| bool mirror_left_right | ( | self | ) |
Gets the current left-right mirroring setting.
Definition at line 121 of file transformation_module.py.
| None mirror_left_right | ( | self, | |
| bool | value ) |
Sets whether the image should be mirrored left-right.
| value | If true, the image will be mirrored along the vertical axis. |
Definition at line 133 of file transformation_module.py.
| bool mirror_up_down | ( | self | ) |
Gets the current up-down mirroring setting.
Definition at line 145 of file transformation_module.py.
| None mirror_up_down | ( | self, | |
| bool | value ) |
Sets whether the image should be mirrored up-down.
| value | If true, the image will be mirrored along the horizontal axis. |
Definition at line 157 of file transformation_module.py.
Processes the input image and returns a mirrored and/or rotated copy based on current settings.
|
|
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
| input | The input image to be processed. |
| NotSupportedException | If the image has any other than the supported pixel formats. |
Reimplemented from IModule.
Definition at line 56 of file transformation_module.py.
| None reset_to_default | ( | self | ) |
Resets all settings to the default values:
Reimplemented from IModule.
Definition at line 107 of file transformation_module.py.
| Rotation rotation_angle | ( | self | ) |
Gets the current rotation angle.
Definition at line 169 of file transformation_module.py.
| None rotation_angle | ( | self, | |
| Rotation | value ) |
Sets the desired rotation angle.
| value | The rotation angle to apply (see RotationAngle enum). |
Definition at line 181 of file transformation_module.py.
| None serialize | ( | self, | |
| IArchive | archive ) |
Serializes the object's internal state into an archive.
This function populates an 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.
Reimplemented from ModuleBase.
Definition at line 217 of file transformation_module.py.
| str type | ( | self | ) |
Returns the type of the module for serialization purposes.
Reimplemented from IModule.
Definition at line 46 of file transformation_module.py.
|
protected |
Definition at line 43 of file transformation_module.py.
|
protected |
Definition at line 39 of file transformation_module.py.
|
protected |
Definition at line 40 of file transformation_module.py.
|
protected |
Definition at line 41 of file transformation_module.py.
|
protected |
Definition at line 42 of file transformation_module.py.
|
static |
Definition at line 27 of file transformation_module.py.
|
static |
Definition at line 28 of file transformation_module.py.
|
static |
Definition at line 29 of file transformation_module.py.
| mirror_left_right = mirror_archive.get("LeftRight", bool) |
Definition at line 271 of file transformation_module.py.
| mirror_up_down = mirror_archive.get("UpDown", bool) |
Definition at line 270 of file transformation_module.py.
| rotation_angle = Rotation(rotation_archive.get("Angle", int)) |
Definition at line 274 of file transformation_module.py.
| version |
Definition at line 230 of file transformation_module.py.