![]() |
IDS peak ICV v1.2.0
|
#include <peak_common/types/peak_common_pixel_format.hpp>
Public Member Functions | |
| PixelFormatInfo (peak::common::PixelFormat pixelFormat) | |
| Constructs a PixelFormatInfo object for the specified pixel format. | |
| PixelFormatInfo (const std::string &name) | |
| Constructs a PixelFormatInfo object from the name of a pixel format. | |
| template<typename T = size_t> | |
| T | GetMinimumValuePerChannel () const |
| Returns the minimum possible value per channel for the pixel format. | |
| template<typename T = size_t> | |
| T | GetMaximumValuePerChannel () const |
| Returns the maximum possible value per channel for the pixel format. | |
| size_t | GetStorageBitsPerPixel () const |
| Returns the total number of bits used per pixel for storage. | |
| size_t | GetStorageBitsPerChannel () const |
| Returns the number of bits used per channel for storage. | |
| std::string | GetName () const |
| Returns the human-readable name of the pixel format. | |
| std::vector< Channel > | GetChannels () const |
| Returns the list of channels in the pixel format. | |
| size_t | GetAllocatedBitsPerPixel () const |
| Returns the number of allocated bits per pixel. | |
| bool | HasIntensityChannel () const |
| Checks whether the pixel format includes an intensity channel. | |
| size_t | GetChannelIndex (Channel channel) const |
| Returns the index of a specific channel within the pixel format. | |
| size_t | GetNumberOfChannels () const |
| Returns the total number of channels in the pixel format. | |
| bool | IsSingleChannel () const |
| Checks whether the pixel format contains only a single channel. | |
| bool | HasChannel (Channel channel) const |
| Checks whether a specific channel is present in the pixel format. | |
| peak::common::PixelFormat | GetPixelFormat () const |
| Returns the underlying pixel format enumeration value. | |
| size_t | GetSizeInBytes (const Size &size) const |
| Calculates the memory size in bytes for a given image size. | |
| bool | IsPacked () const |
| Returns whether the pixel format is packed. | |
| bool | IsInterleaved () const |
| Indicates whether the pixel format is interleaved. | |
| bool | IsFloat () const |
| Returns whether the pixel format uses floating points. | |
| PixelFormat | GetUnpackedPixelFormat () const |
| Returns the unpacked pixel format for a packed pixel format. | |
| template<> | |
| size_t | GetMinimumValuePerChannel () const |
| template<> | |
| float | GetMinimumValuePerChannel () const |
| template<> | |
| size_t | GetMaximumValuePerChannel () const |
| template<> | |
| float | GetMaximumValuePerChannel () const |
Provides information and utility functions for pixel formats.
The PixelFormatInfo class offers methods to query characteristics of specific pixel formats, such as value ranges, storage sizes, and channel configurations.
Definition at line 224 of file peak_common_pixel_format.hpp.
|
inlineexplicit |
Constructs a PixelFormatInfo object for the specified pixel format.
| pixelFormat | The pixel format to describe. |
Definition at line 433 of file peak_common_pixel_format.hpp.
|
inlineexplicit |
Constructs a PixelFormatInfo object from the name of a pixel format.
| name | The name of the pixel format. |
Definition at line 20 of file peak_common_pixel_format_info.ipp.
|
inline |
Returns the number of allocated bits per pixel.
Definition at line 915 of file peak_common_pixel_format_info.ipp.
|
inline |
Returns the index of a specific channel within the pixel format.
| channel | The channel to locate. |
Definition at line 442 of file peak_common_pixel_format.hpp.
|
inline |
Returns the list of channels in the pixel format.
Definition at line 2433 of file peak_common_pixel_format_info.ipp.
|
inline |
Definition at line 2948 of file peak_common_pixel_format_info.ipp.
|
inline |
Definition at line 3192 of file peak_common_pixel_format_info.ipp.
| T GetMaximumValuePerChannel | ( | ) | const |
Returns the maximum possible value per channel for the pixel format.
| T | The value type (default is size_t). |
Definition at line 130 of file peak_common_pixel_format.ipp.
|
inline |
Definition at line 2686 of file peak_common_pixel_format_info.ipp.
|
inline |
Definition at line 2930 of file peak_common_pixel_format_info.ipp.
| T GetMinimumValuePerChannel | ( | ) | const |
Returns the minimum possible value per channel for the pixel format.
| T | The value type (default is size_t). |
Definition at line 124 of file peak_common_pixel_format.ipp.
|
inline |
Returns the human-readable name of the pixel format.
Definition at line 662 of file peak_common_pixel_format_info.ipp.
|
inline |
Returns the total number of channels in the pixel format.
Definition at line 454 of file peak_common_pixel_format.hpp.
|
inline |
Returns the underlying pixel format enumeration value.
Definition at line 470 of file peak_common_pixel_format.hpp.
|
inline |
Calculates the memory size in bytes for a given image size.
| size | The size of the image. |
Definition at line 1168 of file peak_common_pixel_format_info.ipp.
|
inline |
Returns the number of bits used per channel for storage.
Definition at line 409 of file peak_common_pixel_format_info.ipp.
|
inline |
Returns the total number of bits used per pixel for storage.
Definition at line 156 of file peak_common_pixel_format_info.ipp.
|
inline |
Returns the unpacked pixel format for a packed pixel format.
If the pixel format is already unpacked, the same format is returned.
Definition at line 2180 of file peak_common_pixel_format_info.ipp.
|
inline |
Checks whether a specific channel is present in the pixel format.
| channel | The channel to check for. |
Definition at line 464 of file peak_common_pixel_format.hpp.
|
inline |
Checks whether the pixel format includes an intensity channel.
Definition at line 437 of file peak_common_pixel_format.hpp.
|
inline |
Returns whether the pixel format uses floating points.
Definition at line 1927 of file peak_common_pixel_format_info.ipp.
|
inline |
Indicates whether the pixel format is interleaved.
Interleaved pixel formats arrange multiple image streams in memory using different patterns. The exact interleaving strategy depends on the pixel format family:
Mono*_A_B Images A and B alternate by row:
Memory row 1: Image A (row 1) Memory row 2: Image B (row 1) Memory row 3: Image A (row 2) Memory row 4: Image B (row 2) ...
Bayer*_A_B Images A and B are grouped in pairs of rows:
Memory row 1: Image A (row 1) Memory row 2: Image A (row 2) Memory row 3: Image B (row 1) Memory row 4: Image B (row 2) Memory row 5: Image A (row 3) Memory row 6: Image A (row 4) Memory row 7: Image B (row 3) Memory row 8: Image B (row 4) ...
Mono*_AB_CD Four image streams (A, B, C, D) are interleaved within each row:
Memory row 1: | A | B | A | B | A | B | Memory row 2: | C | D | C | D | C | D | Memory row 3: | A | B | A | B | A | B | Memory row 4: | C | D | C | D | C | D | ...
Definition at line 1674 of file peak_common_pixel_format_info.ipp.
|
inline |
Returns whether the pixel format is packed.
Definition at line 1421 of file peak_common_pixel_format_info.ipp.
|
inline |
Checks whether the pixel format contains only a single channel.
Definition at line 459 of file peak_common_pixel_format.hpp.