20#include <unordered_map>
166 template <
typename T =
size_t>
176 template <
typename T =
size_t>
293template <peak::common::PixelFormat pixelFormat>
294struct PixelFormatTraits;
316 static constexpr bool isYUV =
false;
337 static constexpr bool isYUV =
false;
358 static constexpr bool isYUV =
false;
379 static constexpr bool isYUV =
false;
400 static constexpr bool isYUV =
false;
421 static constexpr bool isYUV =
false;
442 static constexpr bool isYUV =
false;
463 static constexpr bool isYUV =
false;
478 return "Coord3D_ABC32f";
484 static constexpr bool isYUV =
false;
499 return "Coord3D_C32f";
505 static constexpr bool isYUV =
false;
526 static constexpr bool isYUV =
false;
547 static constexpr bool isYUV =
false;
568 static constexpr bool isYUV =
false;
589 static constexpr bool isYUV =
false;
610 static constexpr bool isYUV =
false;
631 static constexpr bool isYUV =
false;
652 static constexpr bool isYUV =
false;
673 static constexpr bool isYUV =
false;
694 static constexpr bool isYUV =
false;
715 static constexpr bool isYUV =
false;
736 static constexpr bool isYUV =
false;
757 static constexpr bool isYUV =
false;
778 static constexpr bool isYUV =
false;
799 static constexpr bool isYUV =
false;
820 static constexpr bool isYUV =
false;
841 static constexpr bool isYUV =
false;
862 static constexpr bool isYUV =
false;
883 static constexpr bool isYUV =
false;
904 static constexpr bool isYUV =
false;
925 static constexpr bool isYUV =
false;
946 static constexpr bool isYUV =
false;
967 static constexpr bool isYUV =
false;
988 static constexpr bool isYUV =
false;
1024 return "BayerGR10p";
1045 return "BayerGR12p";
1066 return "BayerRG10p";
1087 return "BayerRG12p";
1108 return "BayerGB10p";
1129 return "BayerGB12p";
1150 return "BayerBG10p";
1171 return "BayerBG12p";
1192 return "Confidence8";
1213 return "Confidence16";
1234 return "Coord3D_C8";
1255 return "Coord3D_C16";
1276 return "BayerBG10g40IDS";
1297 return "BayerBG12g24IDS";
1318 return "BayerGB10g40IDS";
1339 return "BayerGB12g24IDS";
1360 return "BayerGR10g40IDS";
1381 return "BayerGR12g24IDS";
1402 return "BayerRG10g40IDS";
1423 return "BayerRG12g24IDS";
1444 return "YUV420_8_YY_UV_SemiplanarIDS";
1465 return "YUV420_8_YY_VU_SemiplanarIDS";
1486 return "YUV422_8_UYVY";
1507 return "Mono10g40IDS";
1528 return "Mono12g24IDS";
1538template <
typename T,
bool isFloat>
1539struct ValueRangeHelper;
1541template <
typename T>
1542struct ValueRangeHelper<T, false>
1544 static constexpr T Minimum(
size_t)
1549 static constexpr T Maximum(
size_t bitsPerChannel)
1551 return static_cast<T
>((1ULL << bitsPerChannel) - 1);
1555template <
typename T>
1556struct ValueRangeHelper<T, true>
1558 static constexpr T Minimum(
size_t)
1560 return std::numeric_limits<T>::lowest();
1563 static constexpr T Maximum(
size_t)
1565 return (std::numeric_limits<T>::max)();
1569template <PixelFormat pixelFormat>
1570struct PixelFormatInfo
1572 using traits = PixelFormatTraits<pixelFormat>;
1573 using underlying_type =
typename traits::underlying_type;
1574 static constexpr bool is_floating_point = std::is_floating_point<underlying_type>::value;
1576 static constexpr size_t storageBitsPerPixel = traits::storageBitsPerPixel;
1577 static constexpr size_t allocatedBitsPerPixel = traits::allocatedBitsPerPixel;
1579 static constexpr size_t storageBitsPerChannel = storageBitsPerPixel / traits::Channels().size();
1581 static constexpr underlying_type minimumValuePerChannel = ValueRangeHelper<underlying_type, is_floating_point>::Minimum(
1582 storageBitsPerChannel);
1584 static constexpr underlying_type maximumValuePerChannel = ValueRangeHelper<underlying_type, is_floating_point>::Maximum(
1585 storageBitsPerChannel);
1587 static constexpr auto Channels()
1589 return traits::Channels();
1592 static constexpr const char* Name()
1594 return traits::Name();
1597 static constexpr size_t GetSizeInBytes(
const Size& size)
1599 const auto area =
static_cast<uint64_t
>(size.GetWidth()) * size.GetHeight();
1600 return static_cast<size_t>(((area * PixelFormatInfo<pixelFormat>::allocatedBitsPerPixel) + 7) / 8);
1604template <
typename PixelFormatInfo>
1605inline auto ChannelsVector()
1607 constexpr auto arr = PixelFormatInfo::Channels();
1608 using T =
typename std::decay_t<
typename decltype(arr)::value_type>;
1609 return std::vector<T>(arr.begin(), arr.end());
1617 : m_pixelFormat{ pixelFormat }
1622 static const std::unordered_map<std::string, PixelFormat> map = {
1684 const auto iter = map.find(name);
1685 if (iter == map.end())
1689 m_pixelFormat = iter->second;
1708 switch (m_pixelFormat)
1711 return detail::PixelFormatInfo<peak::common::PixelFormat::Coord3D_ABC32f>::maximumValuePerChannel;
1713 return detail::PixelFormatInfo<peak::common::PixelFormat::Coord3D_C32f>::maximumValuePerChannel;
1716 "The template does not match the data type of pixel format " +
GetName() +
"! Use size_t as template argument.");
1735 switch (m_pixelFormat)
1738 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono8>::maximumValuePerChannel;
1740 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10>::maximumValuePerChannel;
1742 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12>::maximumValuePerChannel;
1744 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono16>::maximumValuePerChannel;
1746 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10p>::maximumValuePerChannel;
1748 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12p>::maximumValuePerChannel;
1750 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB8>::maximumValuePerChannel;
1752 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10>::maximumValuePerChannel;
1754 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB12>::maximumValuePerChannel;
1756 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa8>::maximumValuePerChannel;
1758 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa10>::maximumValuePerChannel;
1760 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa12>::maximumValuePerChannel;
1762 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR8>::maximumValuePerChannel;
1764 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10>::maximumValuePerChannel;
1766 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR12>::maximumValuePerChannel;
1768 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa8>::maximumValuePerChannel;
1770 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa10>::maximumValuePerChannel;
1772 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa12>::maximumValuePerChannel;
1774 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10p32>::maximumValuePerChannel;
1776 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10p32>::maximumValuePerChannel;
1778 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR8>::maximumValuePerChannel;
1780 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10>::maximumValuePerChannel;
1782 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12>::maximumValuePerChannel;
1784 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG8>::maximumValuePerChannel;
1786 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10>::maximumValuePerChannel;
1788 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12>::maximumValuePerChannel;
1790 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB8>::maximumValuePerChannel;
1792 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10>::maximumValuePerChannel;
1794 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12>::maximumValuePerChannel;
1796 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG8>::maximumValuePerChannel;
1798 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10>::maximumValuePerChannel;
1800 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12>::maximumValuePerChannel;
1802 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10p>::maximumValuePerChannel;
1804 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12p>::maximumValuePerChannel;
1806 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10p>::maximumValuePerChannel;
1808 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12p>::maximumValuePerChannel;
1810 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10p>::maximumValuePerChannel;
1812 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12p>::maximumValuePerChannel;
1814 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10p>::maximumValuePerChannel;
1816 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12p>::maximumValuePerChannel;
1818 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence8>::maximumValuePerChannel;
1820 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence16>::maximumValuePerChannel;
1822 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C8>::maximumValuePerChannel;
1824 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C16>::maximumValuePerChannel;
1826 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10g40IDS>::maximumValuePerChannel;
1828 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12g24IDS>::maximumValuePerChannel;
1830 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10g40IDS>::maximumValuePerChannel;
1832 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12g24IDS>::maximumValuePerChannel;
1834 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10g40IDS>::maximumValuePerChannel;
1836 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12g24IDS>::maximumValuePerChannel;
1838 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10g40IDS>::maximumValuePerChannel;
1840 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12g24IDS>::maximumValuePerChannel;
1842 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10g40IDS>::maximumValuePerChannel;
1844 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12g24IDS>::maximumValuePerChannel;
1846 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_UV_SemiplanarIDS>::maximumValuePerChannel;
1848 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_VU_SemiplanarIDS>::maximumValuePerChannel;
1850 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV422_8_UYVY>::maximumValuePerChannel;
1853 "The template does not match the data type of pixel format " +
GetName() +
"! Use float as template argument.");
1863template <
typename T>
1866 static_assert(
true,
"The given template type is not supported! Only size_t and float can be used.");
1887 switch (m_pixelFormat)
1890 return detail::PixelFormatInfo<peak::common::PixelFormat::Coord3D_ABC32f>::minimumValuePerChannel;
1892 return detail::PixelFormatInfo<peak::common::PixelFormat::Coord3D_C32f>::minimumValuePerChannel;
1895 "The template does not match the data type of pixel format " +
GetName() +
"! Use size_t as template argument.");
1914 switch (m_pixelFormat)
1917 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono8>::minimumValuePerChannel;
1919 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10>::minimumValuePerChannel;
1921 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12>::minimumValuePerChannel;
1923 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono16>::minimumValuePerChannel;
1925 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10p>::minimumValuePerChannel;
1927 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12p>::minimumValuePerChannel;
1929 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB8>::minimumValuePerChannel;
1931 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10>::minimumValuePerChannel;
1933 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB12>::minimumValuePerChannel;
1935 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa8>::minimumValuePerChannel;
1937 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa10>::minimumValuePerChannel;
1939 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa12>::minimumValuePerChannel;
1941 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR8>::minimumValuePerChannel;
1943 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10>::minimumValuePerChannel;
1945 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR12>::minimumValuePerChannel;
1947 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa8>::minimumValuePerChannel;
1949 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa10>::minimumValuePerChannel;
1951 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa12>::minimumValuePerChannel;
1953 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10p32>::minimumValuePerChannel;
1955 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10p32>::minimumValuePerChannel;
1957 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR8>::minimumValuePerChannel;
1959 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10>::minimumValuePerChannel;
1961 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12>::minimumValuePerChannel;
1963 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG8>::minimumValuePerChannel;
1965 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10>::minimumValuePerChannel;
1967 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12>::minimumValuePerChannel;
1969 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB8>::minimumValuePerChannel;
1971 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10>::minimumValuePerChannel;
1973 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12>::minimumValuePerChannel;
1975 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG8>::minimumValuePerChannel;
1977 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10>::minimumValuePerChannel;
1979 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12>::minimumValuePerChannel;
1981 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10p>::minimumValuePerChannel;
1983 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12p>::minimumValuePerChannel;
1985 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10p>::minimumValuePerChannel;
1987 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12p>::minimumValuePerChannel;
1989 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10p>::minimumValuePerChannel;
1991 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12p>::minimumValuePerChannel;
1993 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10p>::minimumValuePerChannel;
1995 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12p>::minimumValuePerChannel;
1997 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence8>::minimumValuePerChannel;
1999 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence16>::minimumValuePerChannel;
2001 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C8>::minimumValuePerChannel;
2003 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C16>::minimumValuePerChannel;
2005 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10g40IDS>::minimumValuePerChannel;
2007 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12g24IDS>::minimumValuePerChannel;
2009 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10g40IDS>::minimumValuePerChannel;
2011 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12g24IDS>::minimumValuePerChannel;
2013 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10g40IDS>::minimumValuePerChannel;
2015 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12g24IDS>::minimumValuePerChannel;
2017 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10g40IDS>::minimumValuePerChannel;
2019 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12g24IDS>::minimumValuePerChannel;
2021 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10g40IDS>::minimumValuePerChannel;
2023 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12g24IDS>::minimumValuePerChannel;
2025 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_UV_SemiplanarIDS>::minimumValuePerChannel;
2027 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_VU_SemiplanarIDS>::minimumValuePerChannel;
2029 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV422_8_UYVY>::minimumValuePerChannel;
2032 "The template does not match the data type of pixel format " +
GetName() +
"! Use float as template argument.");
2042template <
typename T>
2045 static_assert(
true,
"The given template type is not supported! Only size_t and float can be used.");
2052 switch (m_pixelFormat)
2055 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono8>::storageBitsPerPixel;
2057 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10>::storageBitsPerPixel;
2059 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12>::storageBitsPerPixel;
2061 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono16>::storageBitsPerPixel;
2063 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10p>::storageBitsPerPixel;
2065 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12p>::storageBitsPerPixel;
2067 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB8>::storageBitsPerPixel;
2069 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10>::storageBitsPerPixel;
2071 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB12>::storageBitsPerPixel;
2073 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa8>::storageBitsPerPixel;
2075 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa10>::storageBitsPerPixel;
2077 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa12>::storageBitsPerPixel;
2079 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR8>::storageBitsPerPixel;
2081 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10>::storageBitsPerPixel;
2083 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR12>::storageBitsPerPixel;
2085 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa8>::storageBitsPerPixel;
2087 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa10>::storageBitsPerPixel;
2089 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa12>::storageBitsPerPixel;
2091 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10p32>::storageBitsPerPixel;
2093 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10p32>::storageBitsPerPixel;
2095 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR8>::storageBitsPerPixel;
2097 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10>::storageBitsPerPixel;
2099 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12>::storageBitsPerPixel;
2101 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG8>::storageBitsPerPixel;
2103 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10>::storageBitsPerPixel;
2105 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12>::storageBitsPerPixel;
2107 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB8>::storageBitsPerPixel;
2109 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10>::storageBitsPerPixel;
2111 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12>::storageBitsPerPixel;
2113 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG8>::storageBitsPerPixel;
2115 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10>::storageBitsPerPixel;
2117 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12>::storageBitsPerPixel;
2119 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10p>::storageBitsPerPixel;
2121 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12p>::storageBitsPerPixel;
2123 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10p>::storageBitsPerPixel;
2125 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12p>::storageBitsPerPixel;
2127 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10p>::storageBitsPerPixel;
2129 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12p>::storageBitsPerPixel;
2131 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10p>::storageBitsPerPixel;
2133 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12p>::storageBitsPerPixel;
2135 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence8>::storageBitsPerPixel;
2137 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence16>::storageBitsPerPixel;
2139 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C8>::storageBitsPerPixel;
2141 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C16>::storageBitsPerPixel;
2143 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C32f>::storageBitsPerPixel;
2145 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_ABC32f>::storageBitsPerPixel;
2147 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10g40IDS>::storageBitsPerPixel;
2149 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12g24IDS>::storageBitsPerPixel;
2151 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10g40IDS>::storageBitsPerPixel;
2153 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12g24IDS>::storageBitsPerPixel;
2155 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10g40IDS>::storageBitsPerPixel;
2157 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12g24IDS>::storageBitsPerPixel;
2159 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10g40IDS>::storageBitsPerPixel;
2161 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12g24IDS>::storageBitsPerPixel;
2163 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10g40IDS>::storageBitsPerPixel;
2165 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12g24IDS>::storageBitsPerPixel;
2167 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_UV_SemiplanarIDS>::storageBitsPerPixel;
2169 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_VU_SemiplanarIDS>::storageBitsPerPixel;
2171 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV422_8_UYVY>::storageBitsPerPixel;
2173 const auto pixelFormatValue =
static_cast<typename std::underlying_type<decltype(m_pixelFormat)
>::type>(m_pixelFormat);
2175 "The given pixel format with the integer value of " + std::to_string(pixelFormatValue) +
" is unknown!");
2181 switch (m_pixelFormat)
2184 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono8>::storageBitsPerChannel;
2186 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10>::storageBitsPerChannel;
2188 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12>::storageBitsPerChannel;
2190 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono16>::storageBitsPerChannel;
2192 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10p>::storageBitsPerChannel;
2194 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12p>::storageBitsPerChannel;
2196 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB8>::storageBitsPerChannel;
2198 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10>::storageBitsPerChannel;
2200 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB12>::storageBitsPerChannel;
2202 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa8>::storageBitsPerChannel;
2204 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa10>::storageBitsPerChannel;
2206 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa12>::storageBitsPerChannel;
2208 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR8>::storageBitsPerChannel;
2210 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10>::storageBitsPerChannel;
2212 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR12>::storageBitsPerChannel;
2214 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa8>::storageBitsPerChannel;
2216 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa10>::storageBitsPerChannel;
2218 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa12>::storageBitsPerChannel;
2220 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10p32>::storageBitsPerChannel;
2222 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10p32>::storageBitsPerChannel;
2224 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR8>::storageBitsPerChannel;
2226 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10>::storageBitsPerChannel;
2228 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12>::storageBitsPerChannel;
2230 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG8>::storageBitsPerChannel;
2232 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10>::storageBitsPerChannel;
2234 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12>::storageBitsPerChannel;
2236 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB8>::storageBitsPerChannel;
2238 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10>::storageBitsPerChannel;
2240 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12>::storageBitsPerChannel;
2242 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG8>::storageBitsPerChannel;
2244 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10>::storageBitsPerChannel;
2246 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12>::storageBitsPerChannel;
2248 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10p>::storageBitsPerChannel;
2250 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12p>::storageBitsPerChannel;
2252 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10p>::storageBitsPerChannel;
2254 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12p>::storageBitsPerChannel;
2256 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10p>::storageBitsPerChannel;
2258 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12p>::storageBitsPerChannel;
2260 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10p>::storageBitsPerChannel;
2262 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12p>::storageBitsPerChannel;
2264 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence8>::storageBitsPerChannel;
2266 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence16>::storageBitsPerChannel;
2268 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C8>::storageBitsPerChannel;
2270 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C16>::storageBitsPerChannel;
2272 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C32f>::storageBitsPerChannel;
2274 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_ABC32f>::storageBitsPerChannel;
2276 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10g40IDS>::storageBitsPerChannel;
2278 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12g24IDS>::storageBitsPerChannel;
2280 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10g40IDS>::storageBitsPerChannel;
2282 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12g24IDS>::storageBitsPerChannel;
2284 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10g40IDS>::storageBitsPerChannel;
2286 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12g24IDS>::storageBitsPerChannel;
2288 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10g40IDS>::storageBitsPerChannel;
2290 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12g24IDS>::storageBitsPerChannel;
2292 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10g40IDS>::storageBitsPerChannel;
2294 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12g24IDS>::storageBitsPerChannel;
2296 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_UV_SemiplanarIDS>::storageBitsPerChannel;
2298 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_VU_SemiplanarIDS>::storageBitsPerChannel;
2300 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV422_8_UYVY>::storageBitsPerChannel;
2302 const auto pixelFormatValue =
static_cast<typename std::underlying_type<decltype(m_pixelFormat)
>::type>(m_pixelFormat);
2304 "The given pixel format with the integer value of " + std::to_string(pixelFormatValue) +
" is unknown!");
2310 switch (m_pixelFormat)
2313 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono8>::Name();
2315 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10>::Name();
2317 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12>::Name();
2319 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono16>::Name();
2321 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10p>::Name();
2323 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12p>::Name();
2325 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB8>::Name();
2327 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10>::Name();
2329 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB12>::Name();
2331 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa8>::Name();
2333 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa10>::Name();
2335 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa12>::Name();
2337 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR8>::Name();
2339 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10>::Name();
2341 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR12>::Name();
2343 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa8>::Name();
2345 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa10>::Name();
2347 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa12>::Name();
2349 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10p32>::Name();
2351 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10p32>::Name();
2353 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR8>::Name();
2355 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10>::Name();
2357 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12>::Name();
2359 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG8>::Name();
2361 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10>::Name();
2363 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12>::Name();
2365 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB8>::Name();
2367 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10>::Name();
2369 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12>::Name();
2371 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG8>::Name();
2373 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10>::Name();
2375 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12>::Name();
2377 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10p>::Name();
2379 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12p>::Name();
2381 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10p>::Name();
2383 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12p>::Name();
2385 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10p>::Name();
2387 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12p>::Name();
2389 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10p>::Name();
2391 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12p>::Name();
2393 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence8>::Name();
2395 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence16>::Name();
2397 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C8>::Name();
2399 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C16>::Name();
2401 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C32f>::Name();
2403 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_ABC32f>::Name();
2405 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10g40IDS>::Name();
2407 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12g24IDS>::Name();
2409 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10g40IDS>::Name();
2411 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12g24IDS>::Name();
2413 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10g40IDS>::Name();
2415 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12g24IDS>::Name();
2417 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10g40IDS>::Name();
2419 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12g24IDS>::Name();
2421 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10g40IDS>::Name();
2423 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12g24IDS>::Name();
2425 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_UV_SemiplanarIDS>::Name();
2427 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_VU_SemiplanarIDS>::Name();
2429 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV422_8_UYVY>::Name();
2431 const auto pixelFormatValue =
static_cast<typename std::underlying_type<decltype(m_pixelFormat)
>::type>(m_pixelFormat);
2433 "The given pixel format with the integer value of " + std::to_string(pixelFormatValue) +
" is unknown!");
2439 switch (m_pixelFormat)
2442 return { detail::ChannelsVector<detail::PixelFormatInfo<peak::common::PixelFormat::Mono8>>() };
2444 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Mono10>>() };
2446 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Mono12>>() };
2448 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Mono16>>() };
2450 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Mono10p>>() };
2452 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Mono12p>>() };
2454 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::RGB8>>() };
2456 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::RGB10>>() };
2458 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::RGB12>>() };
2460 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::RGBa8>>() };
2462 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::RGBa10>>() };
2464 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::RGBa12>>() };
2466 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BGR8>>() };
2468 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BGR10>>() };
2470 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BGR12>>() };
2472 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BGRa8>>() };
2474 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BGRa10>>() };
2476 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BGRa12>>() };
2478 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::RGB10p32>>() };
2480 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BGR10p32>>() };
2482 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR8>>() };
2484 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10>>() };
2486 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12>>() };
2488 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG8>>() };
2490 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10>>() };
2492 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12>>() };
2494 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB8>>() };
2496 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10>>() };
2498 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12>>() };
2500 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG8>>() };
2502 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10>>() };
2504 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12>>() };
2506 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10p>>() };
2508 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12p>>() };
2510 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10p>>() };
2512 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12p>>() };
2514 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10p>>() };
2516 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12p>>() };
2518 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10p>>() };
2520 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12p>>() };
2522 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Confidence8>>() };
2524 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Confidence16>>() };
2526 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C8>>() };
2528 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C16>>() };
2530 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C32f>>() };
2532 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_ABC32f>>() };
2534 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10g40IDS>>() };
2536 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12g24IDS>>() };
2538 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10g40IDS>>() };
2540 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12g24IDS>>() };
2542 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10g40IDS>>() };
2544 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12g24IDS>>() };
2546 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10g40IDS>>() };
2548 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12g24IDS>>() };
2550 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Mono10g40IDS>>() };
2552 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::Mono12g24IDS>>() };
2554 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_UV_SemiplanarIDS>>() };
2556 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_VU_SemiplanarIDS>>() };
2558 return { detail::ChannelsVector<peak::common::detail::PixelFormatInfo<PixelFormat::YUV422_8_UYVY>>() };
2560 const auto pixelFormatValue =
static_cast<typename std::underlying_type<decltype(m_pixelFormat)
>::type>(m_pixelFormat);
2562 "The given pixel format with the integer value of " + std::to_string(pixelFormatValue) +
" is unknown!");
2568 switch (m_pixelFormat)
2571 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono8>::allocatedBitsPerPixel;
2573 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10>::allocatedBitsPerPixel;
2575 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12>::allocatedBitsPerPixel;
2577 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono16>::allocatedBitsPerPixel;
2579 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10p>::allocatedBitsPerPixel;
2581 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12p>::allocatedBitsPerPixel;
2583 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB8>::allocatedBitsPerPixel;
2585 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10>::allocatedBitsPerPixel;
2587 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB12>::allocatedBitsPerPixel;
2589 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa8>::allocatedBitsPerPixel;
2591 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa10>::allocatedBitsPerPixel;
2593 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa12>::allocatedBitsPerPixel;
2595 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR8>::allocatedBitsPerPixel;
2597 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10>::allocatedBitsPerPixel;
2599 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR12>::allocatedBitsPerPixel;
2601 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa8>::allocatedBitsPerPixel;
2603 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa10>::allocatedBitsPerPixel;
2605 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa12>::allocatedBitsPerPixel;
2607 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10p32>::allocatedBitsPerPixel;
2609 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10p32>::allocatedBitsPerPixel;
2611 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR8>::allocatedBitsPerPixel;
2613 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10>::allocatedBitsPerPixel;
2615 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12>::allocatedBitsPerPixel;
2617 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG8>::allocatedBitsPerPixel;
2619 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10>::allocatedBitsPerPixel;
2621 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12>::allocatedBitsPerPixel;
2623 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB8>::allocatedBitsPerPixel;
2625 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10>::allocatedBitsPerPixel;
2627 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12>::allocatedBitsPerPixel;
2629 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG8>::allocatedBitsPerPixel;
2631 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10>::allocatedBitsPerPixel;
2633 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12>::allocatedBitsPerPixel;
2635 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10p>::allocatedBitsPerPixel;
2637 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12p>::allocatedBitsPerPixel;
2639 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10p>::allocatedBitsPerPixel;
2641 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12p>::allocatedBitsPerPixel;
2643 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10p>::allocatedBitsPerPixel;
2645 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12p>::allocatedBitsPerPixel;
2647 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10p>::allocatedBitsPerPixel;
2649 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12p>::allocatedBitsPerPixel;
2651 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence8>::allocatedBitsPerPixel;
2653 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence16>::allocatedBitsPerPixel;
2655 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C8>::allocatedBitsPerPixel;
2657 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C16>::allocatedBitsPerPixel;
2659 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C32f>::allocatedBitsPerPixel;
2661 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_ABC32f>::allocatedBitsPerPixel;
2663 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10g40IDS>::allocatedBitsPerPixel;
2665 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12g24IDS>::allocatedBitsPerPixel;
2667 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10g40IDS>::allocatedBitsPerPixel;
2669 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12g24IDS>::allocatedBitsPerPixel;
2671 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10g40IDS>::allocatedBitsPerPixel;
2673 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12g24IDS>::allocatedBitsPerPixel;
2675 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10g40IDS>::allocatedBitsPerPixel;
2677 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12g24IDS>::allocatedBitsPerPixel;
2679 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10g40IDS>::allocatedBitsPerPixel;
2681 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12g24IDS>::allocatedBitsPerPixel;
2683 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_UV_SemiplanarIDS>::allocatedBitsPerPixel;
2685 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_VU_SemiplanarIDS>::allocatedBitsPerPixel;
2687 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV422_8_UYVY>::allocatedBitsPerPixel;
2689 const auto pixelFormatValue =
static_cast<typename std::underlying_type<decltype(m_pixelFormat)
>::type>(m_pixelFormat);
2691 "The given pixel format with the integer value of " + std::to_string(pixelFormatValue) +
" is unknown!");
2703 const auto it = std::find(channels.cbegin(), channels.cend(), channel);
2704 if (it == channels.end())
2709 return static_cast<size_t>(std::distance(channels.begin(), it));
2725 return std::find(channels.cbegin(), channels.cend(), channel) != channels.cend();
2730 return m_pixelFormat;
2735 switch (m_pixelFormat)
2738 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono8>::GetSizeInBytes(size);
2740 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10>::GetSizeInBytes(size);
2742 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12>::GetSizeInBytes(size);
2744 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono16>::GetSizeInBytes(size);
2746 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10p>::GetSizeInBytes(size);
2748 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12p>::GetSizeInBytes(size);
2750 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB8>::GetSizeInBytes(size);
2752 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10>::GetSizeInBytes(size);
2754 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB12>::GetSizeInBytes(size);
2756 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa8>::GetSizeInBytes(size);
2758 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa10>::GetSizeInBytes(size);
2760 return peak::common::detail::PixelFormatInfo<PixelFormat::RGBa12>::GetSizeInBytes(size);
2762 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR8>::GetSizeInBytes(size);
2764 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10>::GetSizeInBytes(size);
2766 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR12>::GetSizeInBytes(size);
2768 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa8>::GetSizeInBytes(size);
2770 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa10>::GetSizeInBytes(size);
2772 return peak::common::detail::PixelFormatInfo<PixelFormat::BGRa12>::GetSizeInBytes(size);
2774 return peak::common::detail::PixelFormatInfo<PixelFormat::RGB10p32>::GetSizeInBytes(size);
2776 return peak::common::detail::PixelFormatInfo<PixelFormat::BGR10p32>::GetSizeInBytes(size);
2778 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR8>::GetSizeInBytes(size);
2780 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10>::GetSizeInBytes(size);
2782 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12>::GetSizeInBytes(size);
2784 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG8>::GetSizeInBytes(size);
2786 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10>::GetSizeInBytes(size);
2788 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12>::GetSizeInBytes(size);
2790 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB8>::GetSizeInBytes(size);
2792 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10>::GetSizeInBytes(size);
2794 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12>::GetSizeInBytes(size);
2796 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG8>::GetSizeInBytes(size);
2798 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10>::GetSizeInBytes(size);
2800 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12>::GetSizeInBytes(size);
2802 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10p>::GetSizeInBytes(size);
2804 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12p>::GetSizeInBytes(size);
2806 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10p>::GetSizeInBytes(size);
2808 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12p>::GetSizeInBytes(size);
2810 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10p>::GetSizeInBytes(size);
2812 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12p>::GetSizeInBytes(size);
2814 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10p>::GetSizeInBytes(size);
2816 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12p>::GetSizeInBytes(size);
2818 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence8>::GetSizeInBytes(size);
2820 return peak::common::detail::PixelFormatInfo<PixelFormat::Confidence16>::GetSizeInBytes(size);
2822 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C8>::GetSizeInBytes(size);
2824 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C16>::GetSizeInBytes(size);
2826 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_C32f>::GetSizeInBytes(size);
2828 return peak::common::detail::PixelFormatInfo<PixelFormat::Coord3D_ABC32f>::GetSizeInBytes(size);
2830 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG10g40IDS>::GetSizeInBytes(size);
2832 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerBG12g24IDS>::GetSizeInBytes(size);
2834 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB10g40IDS>::GetSizeInBytes(size);
2836 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGB12g24IDS>::GetSizeInBytes(size);
2838 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR10g40IDS>::GetSizeInBytes(size);
2840 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerGR12g24IDS>::GetSizeInBytes(size);
2842 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG10g40IDS>::GetSizeInBytes(size);
2844 return peak::common::detail::PixelFormatInfo<PixelFormat::BayerRG12g24IDS>::GetSizeInBytes(size);
2846 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono10g40IDS>::GetSizeInBytes(size);
2848 return peak::common::detail::PixelFormatInfo<PixelFormat::Mono12g24IDS>::GetSizeInBytes(size);
2850 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_UV_SemiplanarIDS>::GetSizeInBytes(size);
2852 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV420_8_YY_VU_SemiplanarIDS>::GetSizeInBytes(size);
2854 return peak::common::detail::PixelFormatInfo<PixelFormat::YUV422_8_UYVY>::GetSizeInBytes(size);
2856 const auto pixelFormatValue =
static_cast<typename std::underlying_type<decltype(m_pixelFormat)
>::type>(m_pixelFormat);
2858 "The given pixel format with the integer value of " + std::to_string(pixelFormatValue) +
" is unknown!");
Thrown when a function receives an invalid parameter.
Definition peak_common_exceptions.hpp:50
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.
Definition peak_common_defines.hpp:91
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:45
@ X
Definition peak_common_channel.hpp:34
@ Z
Definition peak_common_channel.hpp:36
@ Y
Definition peak_common_channel.hpp:35
@ Alpha
Definition peak_common_channel.hpp:33
@ Intensity
Definition peak_common_channel.hpp:29
@ Blue
Definition peak_common_channel.hpp:32
@ Green
Definition peak_common_channel.hpp:31
@ Bayer
Definition peak_common_channel.hpp:37
@ Red
Definition peak_common_channel.hpp:30
@ BayerRG12g24IDS
BayerRG 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:120
@ Coord3D_C8
3D coordinate C 8-Bit format
Definition peak_common_pixel_format.hpp:70
@ RGBa10
RGBA 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:90
@ RGB8
RGB 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:81
@ Mono12p
Mono 12-Bit packed format.
Definition peak_common_pixel_format.hpp:110
@ Mono12
Mono 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:64
@ BGR10p32
BGR 10-Bit packed 32-bit format.
Definition peak_common_pixel_format.hpp:113
@ BayerGB10
BayerGB 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:55
@ BayerRG12p
BayerRG 12-Bit packed format.
Definition peak_common_pixel_format.hpp:107
@ BayerBG10
BayerBG 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:59
@ RGBa8
RGBA 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:89
@ Mono10g40IDS
Mono 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:125
@ BayerGR10g40IDS
BayerGR 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:117
@ BayerBG10p
BayerBG 10-Bit packed format.
Definition peak_common_pixel_format.hpp:97
@ RGBa12
RGBA 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:91
@ BayerGB12p
BayerGB 12-Bit packed format.
Definition peak_common_pixel_format.hpp:101
@ BGRa12
BGRA 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:95
@ BayerGR12
BayerGR 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:48
@ BayerRG10p
BayerRG 10-Bit packed format.
Definition peak_common_pixel_format.hpp:106
@ BayerRG12
BayerRG 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:52
@ BayerGR12p
BayerGR 12-Bit packed format.
Definition peak_common_pixel_format.hpp:104
@ BayerGR8
BayerGR 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:46
@ BayerBG12p
BayerBG 12-Bit packed format.
Definition peak_common_pixel_format.hpp:98
@ BayerBG8
BayerBG 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:58
@ Confidence16
Confidence 16-Bit format.
Definition peak_common_pixel_format.hpp:68
@ Mono12g24IDS
Mono 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:126
@ BayerRG10
BayerRG 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:51
@ BayerGB12
BayerGB 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:56
@ BayerRG8
BayerRG 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:50
@ BayerGR10p
BayerGR 10-Bit packed format.
Definition peak_common_pixel_format.hpp:103
@ YUV422_8_UYVY
UYVY 4:2:2 8-Bit format.
Definition peak_common_pixel_format.hpp:79
@ YUV420_8_YY_VU_SemiplanarIDS
YUV4:2:0 8-Bit YY/VU semiplanar (IDS)
Definition peak_common_pixel_format.hpp:77
@ BayerGB8
BayerGB 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:54
@ BGR12
BGR 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:87
@ Confidence8
Confidence 8-Bit format.
Definition peak_common_pixel_format.hpp:67
@ RGB10
RGB 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:82
@ BayerGR12g24IDS
BayerGR 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:122
@ YUV420_8_YY_UV_SemiplanarIDS
YUV4:2:0 8-Bit YY/UV semiplanar (IDS)
Definition peak_common_pixel_format.hpp:76
@ BayerGR10
BayerGR 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:47
@ Coord3D_C32f
3D coordinate C 32-Bit float format
Definition peak_common_pixel_format.hpp:72
@ Mono16
Mono 16-Bit pixel format.
Definition peak_common_pixel_format.hpp:65
@ Mono10
Mono 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:63
@ Mono8
Mono 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:62
@ BGR10
BGR 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:86
@ Coord3D_ABC32f
3D coordinates A, B, C 32-Bit float format
Definition peak_common_pixel_format.hpp:74
@ RGB12
RGB 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:83
@ BayerBG12
BayerBG 12-Bit pixel format.
Definition peak_common_pixel_format.hpp:60
@ BayerBG10g40IDS
BayerBG 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:118
@ BayerGB10p
BayerGB 10-Bit packed format.
Definition peak_common_pixel_format.hpp:100
@ BGRa8
BGRA 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:93
@ BGRa10
BGRA 10-Bit pixel format.
Definition peak_common_pixel_format.hpp:94
@ Coord3D_C16
3D coordinate C 16-Bit format
Definition peak_common_pixel_format.hpp:71
@ BGR8
BGR 8-Bit pixel format.
Definition peak_common_pixel_format.hpp:85
@ BayerBG12g24IDS
BayerBG 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:123
@ Mono10p
Mono 10-Bit packed format.
Definition peak_common_pixel_format.hpp:109
@ BayerRG10g40IDS
BayerRG 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:115
@ RGB10p32
RGB 10-Bit packed 32-bit format.
Definition peak_common_pixel_format.hpp:112
@ BayerGB10g40IDS
BayerGB 10-Bit grouped 40-bit (IDS)
Definition peak_common_pixel_format.hpp:116
@ BayerGB12g24IDS
BayerGB 12-Bit grouped 24-bit (IDS)
Definition peak_common_pixel_format.hpp:121
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22
std::ostream & operator<<(std::ostream &os, PixelFormat pixelFormat)
Definition peak_common_pixel_format.hpp:282
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33