20#include <unordered_map>
36 return static_cast<uint32_t
>(
static_cast<std::underlying_type_t<peak_common_pixel_format>
>(pixelFormat));
249 template <
typename T =
size_t>
259 template <
typename T =
size_t>
433 : m_pixelFormat{ pixelFormat }
444 const auto it = std::find(channels.cbegin(), channels.cend(), channel);
445 if (it == channels.end())
450 return static_cast<size_t>(std::distance(channels.begin(), it));
466 return std::find(channels.cbegin(), channels.cend(), channel) != channels.cend();
471 return m_pixelFormat;
Thrown when a function receives an invalid parameter.
Definition peak_common_exceptions.hpp:58
peak_common_pixel_format
Enum listing all supported pixel formats and their internal IDs.
Definition peak_common_pixel_format.h:41
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.
Definition peak_common_defines.h:86
detail::SizeT< uint32_t > Size
Size with unsigned 32-bit integer dimensions.
Definition peak_common_size.hpp:273
Channel
Represents the various data channels in image or spatial data formats.
Definition peak_common_channel.hpp:28
PixelFormat
Enum listing all supported pixel formats and their internal IDs.
Definition peak_common_pixel_format.hpp:51
@ Intensity
Definition peak_common_channel.hpp:29
@ RGB32fIDS
RGB 32-Bit float format (IDS)
Definition peak_common_pixel_format.hpp:135
@ BayerGR12p_I_A_B
BayerGR 12-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:170
@ BayerGB12_AB
BayerGB 12-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:189
@ BayerRG12g24IDS
BayerRG 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:126
@ BayerBG12p_I_A_B
BayerBG 12-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:169
@ Coord3D_C8
3D coordinate C 8-Bit format
Definition peak_common_pixel_format.hpp:76
@ Mono10g40IDS_I_A_B
Mono 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:137
@ RGBa10
RGBA 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:96
@ RGB8
RGB 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:87
@ Mono10_I_AB_CD
Mono 10-Bit pixel format pixel Interleaved Components A, B, C, D.
Definition peak_common_pixel_format.hpp:173
@ Mono12p
Mono 12-Bit packed format.
Definition peak_common_pixel_format.hpp:116
@ Mono12
Mono 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:70
@ BGR10p32
BGR 10-Bit packed 32-bit format.
Definition peak_common_pixel_format.hpp:119
@ BayerGR12_AB
BayerGR 12-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:188
@ BayerGB10
BayerGB 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:61
@ BayerBG8_I_A_B
BayerBG 8-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:149
@ BayerGB12p_I_A_B
BayerGB 12-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:171
@ BayerRG12p
BayerRG 12-Bit packed format.
Definition peak_common_pixel_format.hpp:113
@ BayerBG10
BayerBG 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:65
@ BayerGR10_I_A_B
BayerGR 10-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:155
@ RGBa8
RGBA 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:95
@ Mono10g40IDS
Mono 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:131
@ BayerRG8_I_A_B
BayerRG 8-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:148
@ BayerGB10g40IDS_I_A_B
BayerGB 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:141
@ BayerGR10g40IDS
BayerGR 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:123
@ BayerGR12_I_A_B
BayerGR 12-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:160
@ BayerBG8_AB
BayerBG 8-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:192
@ BayerBG10p
BayerBG 10-Bit packed format.
Definition peak_common_pixel_format.hpp:103
@ BayerRG10p_I_A_B
BayerRG 10-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:163
@ Mono10_ABCD
Mono 10-Bit pixel format Components A, B, C, D.
Definition peak_common_pixel_format.hpp:196
@ RGBa12
RGBA 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:97
@ BayerGB10p_I_A_B
BayerGB 10-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:166
@ BayerGB12p
BayerGB 12-Bit packed format.
Definition peak_common_pixel_format.hpp:107
@ BGRa12
BGRA 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:101
@ BayerGR12
BayerGR 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:54
@ Mono10p_I_A_B
Mono 10-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:162
@ BayerRG10p
BayerRG 10-Bit packed format.
Definition peak_common_pixel_format.hpp:112
@ BayerGR8_I_A_B
BayerGR 8-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:150
@ BayerGR10p_I_A_B
BayerGR 10-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:165
@ BayerRG12
BayerRG 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:58
@ BayerBG10g40IDS_I_A_B
BayerBG 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:139
@ BayerGR12p
BayerGR 12-Bit packed format.
Definition peak_common_pixel_format.hpp:110
@ BayerGR8
BayerGR 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:52
@ BayerBG12p
BayerBG 12-Bit packed format.
Definition peak_common_pixel_format.hpp:104
@ BayerBG8
BayerBG 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:64
@ BayerBG12_AB
BayerBG 12-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:187
@ Confidence16
Confidence 16-Bit format.
Definition peak_common_pixel_format.hpp:74
@ BayerGB12_I_A_B
BayerGB 12-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:161
@ Mono12g24IDS
Mono 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:132
@ BayerRG10
BayerRG 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:57
@ BayerGB12
BayerGB 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:62
@ Mono8_I_AB_CD
Mono 8-Bit pixel format pixel Interleaved Components A, B, C, D.
Definition peak_common_pixel_format.hpp:172
@ BayerRG8
BayerRG 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:56
@ BayerGR10p
BayerGR 10-Bit packed format.
Definition peak_common_pixel_format.hpp:109
@ BayerBG12_I_A_B
BayerBG 12-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:159
@ BayerBG10_AB
BayerBG 10-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:182
@ YUV422_8_UYVY
UYVY 4:2:2 8-Bit format.
Definition peak_common_pixel_format.hpp:85
@ YUV420_8_YY_VU_SemiplanarIDS
YUV4:2:0 8-Bit YY/VU semiplanar (IDS)
Definition peak_common_pixel_format.hpp:83
@ BayerRG12g24IDS_I_A_B
BayerRG 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:143
@ Mono8_ABCD
Mono 8-Bit pixel format Components A, B, C, D.
Definition peak_common_pixel_format.hpp:195
@ Mono12p_I_AB_CD
Mono 12-Bit packed format pixel Interleaved Components A, B, C, D.
Definition peak_common_pixel_format.hpp:176
@ BayerGB8
BayerGB 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:60
@ Mono12_I_AB_CD
Mono 12-Bit pixel format pixel Interleaved Components A, B, C, D.
Definition peak_common_pixel_format.hpp:174
@ Mono10_I_A_B
Mono 10-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:152
@ BGR12
BGR 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:93
@ Mono8_AB
Mono 8-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:190
@ Confidence8
Confidence 8-Bit format.
Definition peak_common_pixel_format.hpp:73
@ Mono10g40IDS_I_AB_CD
Mono 10-Bit grouped 40-bit (IDS) pixel Interleaved Components A, B, C, D.
Definition peak_common_pixel_format.hpp:177
@ BayerRG10g40IDS_I_A_B
BayerRG 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:138
@ BayerGR12g24IDS_I_A_B
BayerGR 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:145
@ RGB10
RGB 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:88
@ BayerGR12g24IDS
BayerGR 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:128
@ YUV420_8_YY_UV_SemiplanarIDS
YUV4:2:0 8-Bit YY/UV semiplanar (IDS)
Definition peak_common_pixel_format.hpp:82
@ BayerGR10
BayerGR 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:53
@ Coord3D_C32f
3D coordinate C 32-Bit float format
Definition peak_common_pixel_format.hpp:78
@ Mono16
Mono 16-Bit pixel format.
Definition peak_common_pixel_format.hpp:71
@ Mono10
Mono 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:69
@ BayerRG12_AB
BayerRG 12-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:186
@ Mono10p_I_AB_CD
Mono 10-Bit packed format pixel Interleaved Components A, B, C, D.
Definition peak_common_pixel_format.hpp:175
@ Mono12g24IDS_I_A_B
Mono 12-Bit grouped 24-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:142
@ BayerRG10_AB
BayerRG 10-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:181
@ Mono8
Mono 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:68
@ Mono12_I_A_B
Mono 12-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:157
@ BGR10
BGR 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:92
@ BayerBG10_I_A_B
BayerBG 10-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:154
@ Mono12p_I_A_B
Mono 12-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:167
@ BayerGB12g24IDS_I_A_B
BayerGB 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:146
@ Coord3D_ABC32f
3D coordinates A, B, C 32-Bit float format
Definition peak_common_pixel_format.hpp:80
@ RGB12
RGB 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:89
@ BayerGB10_I_A_B
BayerGB 10-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:156
@ BayerBG10p_I_A_B
BayerBG 10-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:164
@ BayerGR10_AB
BayerGR 10-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:183
@ BayerBG12
BayerBG 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:66
@ BayerBG10g40IDS
BayerBG 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:124
@ BayerGR8_AB
BayerGR 8-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:193
@ BayerGB10p
BayerGB 10-Bit packed format.
Definition peak_common_pixel_format.hpp:106
@ Mono12g24IDS_I_AB_CD
Mono 12-Bit grouped 24-bit (IDS) pixel Interleaved Components A, B, C, D.
Definition peak_common_pixel_format.hpp:178
@ Mono32fIDS
Mono 32-Bit float format (IDS)
Definition peak_common_pixel_format.hpp:134
@ BayerRG8_AB
BayerRG 8-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:191
@ BGRa8
BGRA 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:99
@ BayerGB8_AB
BayerGB 8-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:194
@ BayerGB10_AB
BayerGB 10-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:184
@ BGRa10
BGRA 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:100
@ Coord3D_C16
3D coordinate C 16-Bit format
Definition peak_common_pixel_format.hpp:77
@ BayerRG12_I_A_B
BayerRG 12-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:158
@ BGR8
BGR 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:91
@ BayerBG12g24IDS_I_A_B
BayerBG 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:144
@ BayerBG12g24IDS
BayerBG 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:129
@ Mono8_I_A_B
Mono 8-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:147
@ Mono12_AB
Mono 12-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:185
@ Mono10_AB
Mono 10-Bit pixel format Components A, B.
Definition peak_common_pixel_format.hpp:180
@ BayerGR10g40IDS_I_A_B
BayerGR 10-Bit grouped 40-bit (IDS) line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:140
@ Mono10p
Mono 10-Bit packed format.
Definition peak_common_pixel_format.hpp:115
@ BayerRG10g40IDS
BayerRG 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:121
@ BayerGB8_I_A_B
BayerGB 8-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:151
@ BayerRG12p_I_A_B
BayerRG 12-Bit packed format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:168
@ Mono12_ABCD
Mono 12-Bit pixel format Components A, B, C, D.
Definition peak_common_pixel_format.hpp:197
@ BayerRG10_I_A_B
BayerRG 10-Bit pixel format line Interleaved Components A, B.
Definition peak_common_pixel_format.hpp:153
@ RGB10p32
RGB 10-Bit packed 32-bit format.
Definition peak_common_pixel_format.hpp:118
@ BayerGB10g40IDS
BayerGB 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:122
@ BayerGB12g24IDS
BayerGB 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:127
Namespace for internal implementation details and low-level types.
Definition peak_common_math.hpp:24
constexpr uint64_t CPixelFormatCast(peak_common_pixel_format pixelFormat) noexcept
Definition peak_common_pixel_format.hpp:34
constexpr peak_common_pixel_format CppPixelFormatToCPixelFormat(PixelFormat pixelFormat) noexcept
Definition peak_common_pixel_format.hpp:208
constexpr PixelFormat CPixelFormatToCppPixelFormat(peak_common_pixel_format pixelFormat) noexcept
Definition peak_common_pixel_format.hpp:203
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33