IDS peak ICV v1.0.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{
21namespace experimental
22{
23
34class CalibrationPlate : private detail::IBackendAccessible<CalibrationPlate>
35{
36public:
54 explicit CalibrationPlate(const std::string& filePath);
55
62
68 CalibrationPlate(CalibrationPlate&& other) noexcept;
69
76
83
89 ~CalibrationPlate() override;
90
91private:
92 friend peak::common::detail::BackendAccessor<CalibrationPlate>;
93
94 PEAK_ICV_NO_DISCARD peak_icv_calibration_plate_handle GetHandle() const override;
95
96 peak_icv_calibration_plate_handle m_handle{};
97};
98
99inline CalibrationPlate::CalibrationPlate(const std::string& filePath)
100{
102 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_CreateFromFile(&m_handle, filePath.c_str());
103 });
104}
105
107 : m_handle(other.m_handle)
108{
110 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_IncreaseUseCount(other.m_handle);
111 });
112}
113
115{
116 m_handle = std::exchange(other.m_handle, nullptr);
117}
118
120{
121 if (m_handle != other.m_handle)
122 {
123 if (m_handle != nullptr)
124 {
126 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_Destroy(m_handle);
127 });
128 }
129
131 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_IncreaseUseCount(other.m_handle);
132 });
133 m_handle = other.m_handle;
134 }
135 return *this;
136}
137
139{
140 if (m_handle != other.m_handle)
141 {
142 if (m_handle != nullptr)
143 {
145 return PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_Destroy(m_handle);
146 });
147 }
148
149 m_handle = std::exchange(other.m_handle, nullptr);
150 }
151
152 return *this;
153}
154
156{
157 if (m_handle != nullptr)
158 {
159 PEAK_ICV_C_ABI_PREFIX peak_icv_Calibration_Plate_Destroy(m_handle);
160 }
161}
162
163inline peak_icv_calibration_plate_handle CalibrationPlate::GetHandle() const
164{
165 return m_handle;
166}
167
168} /* namespace experimental */
169} /* namespace icv */
170} /* 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)