IDS peak ICV v1.3.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 Gets whether this feature is currently enabled.
31
32 @return True if enabled; otherwise False.
33
34 @since ids_peak_icv 1.0
35 """
36 return self._module._rotation_enabled
37
38 @enabled.setter
39 def enabled(self, enabled: bool) -> None:
40 """!
41 @brief
42 Enables or disables the feature.
43
44 @param enabled: True to enable, False to disable.
45
46 @since ids_peak_icv 1.0
47 """
48 self._module._rotation_enabled = enabled
49
50 @property
51 def angle(self) -> Rotation:
52 """!
53 @brief
54 Gets the current rotation angle.
55
56 @return The currently configured rotation angle.
57
58 @since ids_peak_icv 1.0
59 """
60 return self._module.rotation_angle
61
62 @angle.setter
63 def angle(self, angle: Rotation) -> None:
64 """!
65 @brief
66 Sets the desired rotation angle.
67
68 @param angle: The rotation angle to apply (see RotationAngle enum).
69
70 @since ids_peak_icv 1.0
71 """
72 self._module.rotation_angle = angle
73
74 def reset_to_default(self) -> None:
75 """!
76 @brief
77 Resets the rotation to its default value (Rotation.NO_ROTATION).
78
79 @note The enabled state does not change when calling this function.
80
81 @since ids_peak_icv 1.0
82 """
84
85 def __init__(self, module: TransformationModule) -> None:
86 """!
87 @brief
88 Creates a RotationFeature for an existing transformation module.
89
90 @param module: Reference to the underlying TransformationModule.
91
92 @since ids_peak_icv 1.0
93 """
94 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 its default value (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)
Gets whether this feature is currently enabled.