IDS peak AFL v2.0.1
Loading...
Searching...
No Matches
peak_common_metadata_traits.hpp
Go to the documentation of this file.
1
10
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{
129 using type = RectangleU;
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
detail::RectangleT< uint32_t, uint32_t > RectangleU
Rectangle with unsigned coordinates and unsigned dimensions.
Definition peak_common_rectangle.hpp:266
Namespace for internal implementation details and low-level types.
Definition peak_common_math.hpp:24
constexpr std::array< MetadataKey, 10 > allMetadataKeys
List of all MetadataKeys.
Definition peak_common_metadata_traits.hpp:256
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22
MetadataKey
Enumerates all compile-time known metadata keys.
Definition peak_common_metadata_key.hpp:31
@ Roi
Region of interest applied to the image.
Definition peak_common_metadata_key.hpp:85
@ DeviceGain
Device gain the image was captured with.
Definition peak_common_metadata_key.hpp:131
@ DeviceExposureTime
Device exposure time the image was captured with.
Definition peak_common_metadata_key.hpp:94
@ BinningHorizontal
Horizontal pixel binning factor.
Definition peak_common_metadata_key.hpp:65
@ DeviceExposureTimeSequence
Device exposure time sequence the image was captured with.
Definition peak_common_metadata_key.hpp:124
@ DeviceTimestamp
Device-provided image acquisition timestamp in nanoseconds.
Definition peak_common_metadata_key.hpp:43
@ SystemTimestamp
Timestamp of the system since unix epoch in nanoseconds.
Definition peak_common_metadata_key.hpp:110
@ DeviceGainSequence
Device gain sequence the image was captured with.
Definition peak_common_metadata_key.hpp:143
@ BinningVertical
Vertical pixel binning factor.
Definition peak_common_metadata_key.hpp:74
@ DeviceFrameID
A sequentially incremented identifier for the frame.
Definition peak_common_metadata_key.hpp:56
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:91
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:113
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:157
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:179
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:69
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:223
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:245
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:47
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:135
static constexpr const char * Name()
Get the string name of this key.
Definition peak_common_metadata_traits.hpp:201