IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
peak_common_metadata_traits.hpp
Go to the documentation of this file.
1
11#pragma once
12
15#include <array>
16#include <cstdint>
17
18namespace peak
19{
20namespace common
21{
22namespace detail
23{
25
26template <MetadataKey metadataKey>
27struct MetadataKeyTraits;
28
30
38template <>
39struct MetadataKeyTraits<MetadataKey::DeviceTimestamp>
40{
41 using type = uint64_t;
42
47 static constexpr const char* Name()
48 {
49 return "DeviceTimestamp";
50 }
51};
52
60template <>
61struct MetadataKeyTraits<MetadataKey::DeviceFrameID>
62{
63 using type = uint64_t;
64
69 static constexpr const char* Name()
70 {
71 return "DeviceFrameID";
72 }
73};
74
82template <>
83struct MetadataKeyTraits<MetadataKey::BinningHorizontal>
84{
85 using type = uint32_t;
86
91 static constexpr const char* Name()
92 {
93 return "BinningHorizontal";
94 }
95};
96
104template <>
105struct MetadataKeyTraits<MetadataKey::BinningVertical>
106{
107 using type = uint32_t;
108
113 static constexpr const char* Name()
114 {
115 return "BinningVertical";
116 }
117};
118
126template <>
127struct MetadataKeyTraits<MetadataKey::Roi>
128{
130
135 static constexpr const char* Name()
136 {
137 return "Roi";
138 }
139};
140
148template <>
149struct MetadataKeyTraits<MetadataKey::DeviceExposureTime>
150{
151 using type = double;
152
157 static constexpr const char* Name()
158 {
159 return "DeviceExposureTime";
160 }
161};
162
170template <>
171struct MetadataKeyTraits<MetadataKey::DeviceExposureTimeSequence>
172{
173 using type = std::vector<double>;
174
179 static constexpr const char* Name()
180 {
181 return "DeviceExposureTimeSequence";
182 }
183};
184
192template <>
193struct MetadataKeyTraits<MetadataKey::SystemTimestamp>
194{
195 using type = uint64_t;
196
201 static constexpr const char* Name()
202 {
203 return "SystemTimestamp";
204 }
205};
206
214template <>
215struct MetadataKeyTraits<MetadataKey::DeviceGain>
216{
217 using type = double;
218
223 static constexpr const char* Name()
224 {
225 return "DeviceGain";
226 }
227};
228
236template <>
237struct MetadataKeyTraits<MetadataKey::DeviceGainSequence>
238{
239 using type = std::vector<double>;
240
245 static constexpr const char* Name()
246 {
247 return "DeviceGainSequence";
248 }
249};
250
259} // namespace detail
260} // namespace common
261} // namespace peak
A generic rectangle defined by a point and a size.
constexpr std::array< MetadataKey, 10 > allMetadataKeys
List of all MetadataKeys.
MetadataKey
Enumerates all compile-time known metadata keys.
@ Roi
Region of interest applied to the image.
@ DeviceGain
Device gain the image was captured with.
@ DeviceExposureTime
Device exposure time the image was captured with.
@ BinningHorizontal
Horizontal pixel binning factor.
@ DeviceExposureTimeSequence
Device exposure time sequence the image was captured with.
@ DeviceTimestamp
Device-provided image acquisition timestamp in nanoseconds.
@ SystemTimestamp
Timestamp of the system since unix epoch in nanoseconds.
@ DeviceGainSequence
Device gain sequence the image was captured with.
@ BinningVertical
Vertical pixel binning factor.
@ DeviceFrameID
A sequentially incremented identifier for the frame.
static constexpr const char * Name()
Get the string name of this key.
static constexpr const char * Name()
Get the string name of this key.
static constexpr const char * Name()
Get the string name of this key.
static constexpr const char * Name()
Get the string name of this key.
static constexpr const char * Name()
Get the string name of this key.
static constexpr const char * Name()
Get the string name of this key.
static constexpr const char * Name()
Get the string name of this key.
static constexpr const char * Name()
Get the string name of this key.
static constexpr const char * Name()
Get the string name of this key.