IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
rotation_feature.py
Go to the documentation of this file.
4
5
7 """!
8 @brief
9 Rotation provides fixed-angle rotation functionality.
10
11 @supportedPixelformats{ImageTransformation}
12
13 This feature rotates images in 90-degree increments, based on the rotation mode set via the angle property.
14
15 @warning When processing images with a Bayer pattern, the result may have a different pixel format,
16 though the bit depth remains unchanged. Ensure your application can handle potential pixel format changes
17 after rotation.
18
19 The default rotation is Rotation.NO_ROTATION.
20
21 @ingroup ids_peak_icv_python_pipeline_features
22
23 @since ids_peak_icv 1.0
24 """
25
26 @property
27 def enabled(self) -> bool:
28 """!
29 @brief
30 Indicates whether the feature is currently enabled.
31 @return True if enabled; otherwise, False.
32
33 @since ids_peak_icv 1.0
34 """
35 return self._module._rotation_enabled
36
37 @enabled.setter
38 def enabled(self, value: bool) -> None:
39 """!
40 @brief
41 Enables or disables the feature.
42 @param value: Set to True to enable the feature, or False to disable it.
43
44 @since ids_peak_icv 1.0
45 """
46 self._module._rotation_enabled = value
47
48 @property
49 def angle(self) -> Rotation:
50 """!
51 @brief
52 Gets the current rotation angle.
53
54 @return The currently configured rotation angle.
55
56 @since ids_peak_icv 1.0
57 """
58 return self._module.rotation_angle
59
60 @angle.setter
61 def angle(self, angle: Rotation) -> None:
62 """!
63 @brief
64 Sets the desired rotation angle.
65
66 @param angle: The rotation angle to apply (see RotationAngle enum).
67
68 @since ids_peak_icv 1.0
69 """
70 self._module.rotation_angle = angle
71
72 def reset_to_default(self) -> None:
73 """!
74 @brief
75 Resets the rotation to Rotation.NO_ROTATION.
76
77 @note The enabled state does not change when calling this function.
78
79 @since ids_peak_icv 1.0
80 """
82
83 def __init__(self, module: TransformationModule) -> None:
84 """!
85 @brief
86 Creates a RotationFeature for an existing transformation module.
87
88 @param module: Reference to the underlying TransformationModule.
89
90 @since ids_peak_icv 1.0
91 """
92 self._module = module
Abstract base class for all image processing pipeline features.
Definition ifeature.py:6
Rotation provides fixed-angle rotation functionality.
None reset_to_default(self)
Resets the rotation to Rotation.NO_ROTATION.
Rotation angle(self)
Gets the current rotation angle.
None __init__(self, TransformationModule module)
Creates a RotationFeature for an existing transformation module.
bool enabled(self)
Indicates whether the feature is currently enabled.