6 #ifndef IFM3D_FG_FRAME_H
7 #define IFM3D_FG_FRAME_H
12 #include <type_traits>
14 #include <ifm3d/device/device.h>
15 #include <ifm3d/fg/buffer.h>
16 #include <ifm3d/fg/module_frame_grabber.h>
41 AMPLITUDE_IMAGE =
static_cast<uint64_t
>(ifm3d::image_chunk::AMPLITUDE_IMAGE),
46 GRAYSCALE_IMAGE =
static_cast<uint64_t
>(ifm3d::image_chunk::GRAYSCALE_IMAGE),
56 REFLECTIVITY =
static_cast<uint64_t
>(ifm3d::image_chunk::REFLECTIVITY),
76 CARTESIAN_ALL =
static_cast<uint64_t
>(ifm3d::image_chunk::CARTESIAN_ALL),
81 UNIT_VECTOR_ALL =
static_cast<uint64_t
>(ifm3d::image_chunk::UNIT_VECTOR_ALL),
91 MONOCHROM_2D =
static_cast<uint64_t
>(ifm3d::image_chunk::MONOCHROM_2D),
96 JPEG_IMAGE =
static_cast<uint64_t
>(ifm3d::image_chunk::JPEG_IMAGE),
101 CONFIDENCE_IMAGE =
static_cast<uint64_t
>(ifm3d::image_chunk::CONFIDENCE_IMAGE),
106 DIAGNOSTIC =
static_cast<uint64_t
>(ifm3d::image_chunk::DIAGNOSTIC),
111 JSON_DIAGNOSTIC =
static_cast<uint64_t
>(ifm3d::image_chunk::JSON_DIAGNOSTIC),
116 EXTRINSIC_CALIB =
static_cast<uint64_t
>(ifm3d::image_chunk::EXTRINSIC_CALIB),
121 INTRINSIC_CALIB =
static_cast<uint64_t
>(ifm3d::image_chunk::INTRINSIC_CALIB),
129 O3R_DISTANCE_IMAGE_INFO [[deprecated]] =
static_cast<uint64_t
>(ifm3d::image_chunk::TOF_INFO),
130 O3R_RGB_IMAGE_INFO [[deprecated]] =
static_cast<uint64_t
>(ifm3d::image_chunk::RGB_INFO),
135 TOF_INFO =
static_cast<uint64_t
>(ifm3d::image_chunk::TOF_INFO),
140 RGB_INFO =
static_cast<uint64_t
>(ifm3d::image_chunk::RGB_INFO),
145 JSON_MODEL =
static_cast<uint64_t
>(ifm3d::image_chunk::JSON_MODEL),
150 ALGO_DEBUG =
static_cast<uint64_t
>(ifm3d::image_chunk::ALGO_DEBUG),
160 O3R_ODS_INFO =
static_cast<uint64_t
>(ifm3d::image_chunk::O3R_ODS_INFO),
165 O3R_RESULT_JSON =
static_cast<uint64_t
>(ifm3d::image_chunk::O3R_RESULT_JSON),
175 O3R_RESULT_IMU =
static_cast<uint64_t
>(ifm3d::image_chunk::O3R_RESULT_IMU),
181 XYZ = (std::numeric_limits<std::uint32_t>::max)(),
195 O3R_MCC_MOTION_IMAGE,
196 O3R_MCC_STATIC_IMAGE,
197 O3R_ODS_RENDERED_ZONES,
201 using TimePointT = std::chrono::time_point<std::chrono::system_clock,
202 std::chrono::nanoseconds>;
204 using BufferList = std::vector<Buffer>;
205 using BufferDataListMap = std::map<ifm3d::buffer_id, BufferList>;
214 using Ptr = std::shared_ptr<Frame>;
216 Frame(
const BufferDataListMap& images,
217 const std::vector<TimePointT> timestamps,
218 uint64_t frame_count);
232 std::vector<TimePointT> TimeStamps();
252 std::optional<size_t> index = std::nullopt);
262 uint32_t FrameCount();
270 std::vector<buffer_id> GetBuffers();
272 decltype(std::declval<std::map<buffer_id, BufferList>>().begin())
274 decltype(std::declval<
const std::map<buffer_id, BufferList>>().begin())
275 begin()
const noexcept;
276 decltype(std::declval<std::map<buffer_id, BufferList>>().end())
278 decltype(std::declval<
const std::map<buffer_id, BufferList>>().end()) end()
283 std::unique_ptr<Impl> pImpl;
288 #endif // IFM3D_FG_FRAME_H