1from __future__
import annotations
3from ids_peak_common.datatypes.geometry.point
import Point
10 Represents the coordinate system of a calibration view that was projected into the 2D plane.
11 The coordinate system is represented by its origin and three vectors,
12 each corresponding to one of the three coordinate axes (X, Y and Z).
13 These vectors describe the directions of the respective axes projected from 3D into 2D space.
14 Their lengths are determined by twice the distance between neighboring markers on the calibration plate.
16 @ingroup ids_peak_icv_python_types_geometry
17 @since ids_peak_icv 1.1
20 def __init__(self, origin: Point, x_axis: Point, y_axis: Point, z_axis: Point) ->
None:
23 Creates a coordinate system.
25 @param origin: origin coordinate
26 @param x_axis: x_axis coordinate
27 @param y_axis: y_axis coordinate
28 @param z_axis: z_axis coordinate
30 @exception NotSupportedException: if the given arguments are not points.
31 @since ids_peak_icv 1.1
34 if not isinstance(origin, Point)
and isinstance(x_axis, Point)
and isinstance(y_axis, Point)
and isinstance(
47 Origin of the coordinate system.
49 @since ids_peak_icv 1.1
57 X-axis vector of the coordinate system.
59 @since ids_peak_icv 1.1
67 Y-axis vector of the coordinate system.
69 @since ids_peak_icv 1.1
77 Z-axis vector of the coordinate system.
79 @since ids_peak_icv 1.1
83 def __eq__(self, other: object) -> bool:
86 Check if two coordinate systems are equal.
88 @param other: Another CoordinateSystem object
90 @return True if coordinate systems are equal, False otherwise
92 @since ids_peak_icv 1.1
94 if not isinstance(other, CoordinateSystem):
97 return (self.
_origin == other.origin
and self.
_x_axis == other.x_axis
103 Check if two coordinate systems are not equal.
105 @param other: Another CoordinateSystem object
107 @return True if coordinate systems are not equal, False otherwise
109 @since ids_peak_icv 1.1
111 return not self.
__eq__(other)
116 Get a string representation of the CoordinateSystem.
118 @return String representation of the CoordinateSystem
120 @since ids_peak_icv 1.1
122 return f
"({self._origin}, {self._x_axis}, {self._y_axis}, {self._z_axis})"
Represents the coordinate system of a calibration view that was projected into the 2D plane.
Point z_axis(self)
Z-axis vector of the coordinate system.
bool __eq__(self, object other)
Check if two coordinate systems are equal.
Point x_axis(self)
X-axis vector of the coordinate system.
Point y_axis(self)
Y-axis vector of the coordinate system.
Point origin(self)
Origin of the coordinate system.
None __init__(self, Point origin, Point x_axis, Point y_axis, Point z_axis)
Creates a coordinate system.
str __repr__(self)
Get a string representation of the CoordinateSystem.
bool __ne__(self, object other)
Check if two coordinate systems are not equal.
Occurs when a requested operation is not implemented or supported (e.g., exporting to an unsupported ...