IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
ReprojectionError.cs
Go to the documentation of this file.
2
4
23public class ReprojectionError : IEquatable<ReprojectionError>
24{
25 internal ReprojectionError(PointF position, VectorF direction, double length)
26 {
27 Position = position;
28 Direction = direction;
29 Length = length;
30 }
31
32 internal ReprojectionError(Backend.Types.peak_icv_reprojection_error reprojectionError) :
33 this(reprojectionError.position, reprojectionError.direction, reprojectionError.length)
34 {
35 }
36
41 public PointF Position { get; }
42
47 public VectorF Direction { get; }
48
53 public double Length { get; }
54
62 public override string ToString()
63 {
64 return $"{nameof(Position)}: ({Position}), {nameof(Direction)}: ({Direction}), {nameof(Length)}: {Length}";
65 }
66
71 public bool Equals(ReprojectionError? other)
72 {
73 if (ReferenceEquals(other, null)) return false;
74 return Position.Equals(other.Position) && Direction.Equals(other.Direction) && Length.Equals(other.Length);
75 }
76
81 public override bool Equals(object? other)
82 {
83 if (other is null) return false;
84 if (ReferenceEquals(this, other)) return true;
85 return Equals(other as ReprojectionError);
86 }
87
92 public override int GetHashCode()
93 {
94 return (Position, Direction, Length).GetHashCode();
95 }
96}
override bool Equals(object? obj)
Determines whether the specified object is equal to the current PointT<T>.
Definition Point.cs:41
Represents a 2D point with floating-point coordinates.
Definition Point.cs:126
Represents a 2D vector with floating-point values.
Definition Point.cs:182
Represents the reprojection error for a marker point in the image.
double Length
Provides the magnitude of the error.
override bool Equals(object? other)
Compares the reprojection errors by value.
VectorF Direction
Provides the direction of the error.
override int GetHashCode()
Generates a hash code from the classes properties.
override string ToString()
Converts the ReprojectionError to a string representation.
bool Equals(ReprojectionError? other)
Compares the reprojection errors by value.