3#include "../global.hpp"
4#include "image_buffer_description.hpp"
59 : ImageBufferDescription(size, pixelFormat)
61 if (totalPayloadSize < 4)
63 "Total payload size must at least be "
64 "large enough to hold a chunk");
66 totalPayloadSize_ = totalPayloadSize;
74 return totalPayloadSize_;
82 if (totalPayloadSize < 4)
83 throw std::runtime_error(
"Total payload size must at least be large enough to hold a chunk");
85 totalPayloadSize_ = totalPayloadSize;
126 layoutId_ =
static_cast<CExports::cvbuint32_t
>(layoutId);
131 CExports::GSExtendedChunkDataBlock ChunkImageDataBlock() const noexcept
133 auto dataBlock = CExports::GSExtendedChunkDataBlock{
134 ImageDataBlock(),
static_cast<CExports::cvbuint32_t
>(totalPayloadSize_), layoutId_};
135 dataBlock.ImageData.Header.PayloadType = CExports::TGSPayloadType::GSPT_ChunkImage;
139 int totalPayloadSize_ = 0;
Data type description for an image plane.
Definition data_type.hpp:23
void SetTotalPayloadSize(int totalPayloadSize)
Sets a valid payload size over all chunks including the image chunk.
Definition chunk_image_buffer_description.hpp:80
ChunkImageBufferDescription(Size2D< int > size, PfncFormat pixelFormat, int totalPayloadSize)
Creates a default chunk image buffer description.
Definition chunk_image_buffer_description.hpp:58
int TotalPayloadSize() const noexcept
Gets a valid payload size over all chunks including the image chunk.
Definition chunk_image_buffer_description.hpp:72
void SetLayoutId(const std::int64_t &layoutId)
Sets the layout identifier for the chunks.
Definition chunk_image_buffer_description.hpp:121
ChunkImageBufferDescription(Size2D< int > size, ColorModel colorModel, DataType dataType, int totalPayloadSize)
Creates a default chunk image buffer description.
Definition chunk_image_buffer_description.hpp:46
std::int64_t LayoutId() const noexcept
Gets the layout identifier for the chunks.
Definition chunk_image_buffer_description.hpp:100
Stores a pair of numbers that represents the width and the height of a subject, typically a rectangle...
Definition size_2d.hpp:20
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibl...
Definition decl_int_swiss_knife_node.hpp:11
PfncFormat
GenICam Pixel Format Naming Convention (PFNC) format values.
Definition pfnc_format.hpp:21
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
ColorModel
Color model that this image is using.
Definition global.hpp:176