IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
peak_icv_calibration_plate.hpp
Go to the documentation of this file.
1
11#pragma once
12
15#include <peak_icv_c/algorithms/calibration/peak_icv_calibration_plate.h>
16
17namespace peak
18{
19namespace icv
20{
21
32class CalibrationPlate : private detail::IBackendAccessible<CalibrationPlate>
33{
34public:
52 explicit CalibrationPlate(const std::string& filePath);
53
60
66 CalibrationPlate(CalibrationPlate&& other) noexcept;
67
74
81
87 ~CalibrationPlate() override;
88
89private:
90 friend peak::common::detail::BackendAccessor<CalibrationPlate>;
91
92 PEAK_COMMON_NO_DISCARD peak_icv_calibration_plate_handle GetHandle() const override;
93
94 peak_icv_calibration_plate_handle m_handle{};
95};
96
97inline CalibrationPlate::CalibrationPlate(const std::string& filePath)
98{
100 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_CreateFromFile(&m_handle, filePath.c_str());
101 });
102}
103
105 : m_handle(other.m_handle)
106{
108 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_IncreaseUseCount(other.m_handle);
109 });
110}
111
113{
114 m_handle = std::exchange(other.m_handle, nullptr);
115}
116
118{
119 if (m_handle != other.m_handle)
120 {
121 if (m_handle != nullptr)
122 {
124 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_Destroy(m_handle);
125 });
126 }
127
129 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_IncreaseUseCount(other.m_handle);
130 });
131 m_handle = other.m_handle;
132 }
133 return *this;
134}
135
137{
138 if (m_handle != other.m_handle)
139 {
140 if (m_handle != nullptr)
141 {
143 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_Destroy(m_handle);
144 });
145 }
146
147 m_handle = std::exchange(other.m_handle, nullptr);
148 }
149
150 return *this;
151}
152
154{
155 if (m_handle != nullptr)
156 {
157 std::ignore = PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_Destroy(m_handle);
158 }
159}
160
161inline peak_icv_calibration_plate_handle CalibrationPlate::GetHandle() const
162{
163 return m_handle;
164}
165
166} /* namespace icv */
167} /* namespace peak */
Calibration plate representation holding the world coordinates of the reference points on a calibrati...
CalibrationPlate(const std::string &filePath)
Initializes the object by loading world coordinates from a description file.
CalibrationPlate & operator=(const CalibrationPlate &other)
void ExecuteAndMapReturnCodes(const CallableType &callableObject)