Public Member Functions | List of all members
ChunkImageBufferDescription Class Reference

Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibly additional data. More...

#include <cvb/gevserver/chunk_image_buffer_description.hpp>

Inherits ImageBufferDescription.

Public Member Functions

 ChunkImageBufferDescription (Size2D< int > size, ColorModel colorModel, DataType dataType, int totalPayloadSize)
 Creates a default chunk image buffer description. More...
 
 ChunkImageBufferDescription (Size2D< int > size, PfncFormat pixelFormat, int totalPayloadSize)
 Creates a default chunk image buffer description. More...
 
int TotalPayloadSize () const noexcept
 Gets a valid payload size over all chunks including the image chunk. More...
 
void SetTotalPayloadSize (int totalPayloadSize)
 Sets a valid payload size over all chunks including the image chunk. More...
 
std::int64_t LayoutId () const noexcept
 Gets the layout identifier for the chunks. More...
 
void SetLayoutId (const std::int64_t &layoutId)
 Sets the layout identifier for the chunks. More...
 
- Public Member Functions inherited from ImageBufferDescription
 ImageBufferDescription (Size2D< int > size, ColorModel colorModel, DataType dataType)
 Creates a default image buffer description. More...
 
 ImageBufferDescription (Size2D< int > size, PfncFormat pixelFormat)
 Creates a default image buffer description. More...
 
PfncFormat PixelFormat () const noexcept
 Gets the image pixel format value.
 
void SetPixelFormat (const PfncFormat &pixelFormat)
 Sets the image pixel format value.
 
Size2D< int > Size () const noexcept
 Gets the image size.
 
void SetSize (const Size2D< int > &size)
 Sets the image size.
 
Point2D< int > Offset () const noexcept
 Get the image's offset on the sensor. More...
 
void SetOffset (Point2D< int > point)
 Set the image's offset on the sensor. More...
 
int LinePadding () const noexcept
 Gets the line padding. More...
 
void SetLinePadding (int padding)
 Sets the line padding. More...
 

Detailed Description

Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibly additional data.

This buffer needn't be CVB Image compatible. You can use all PFNC values even packed ones.

Constructor & Destructor Documentation

◆ ChunkImageBufferDescription() [1/2]

ChunkImageBufferDescription ( Size2D< int >  size,
ColorModel  colorModel,
DataType  dataType,
int  totalPayloadSize 
)
inline

Creates a default chunk image buffer description.

Tries to map the given colorModel and dataType to a PfncFormat.

Parameters
sizeWidth and height in pixels.
colorModelColor model of the image to send.
dataTypeCVB data type of the image to send.
totalPayloadSizeSize of the valid payload over all chunks (including the image).

◆ ChunkImageBufferDescription() [2/2]

ChunkImageBufferDescription ( Size2D< int >  size,
PfncFormat  pixelFormat,
int  totalPayloadSize 
)
inline

Creates a default chunk image buffer description.

Parameters
sizeWidth and height in pixels.
pixelFormatGenICam PFNC format value.
totalPayloadSizeSize of the valid payload over all chunks (including the image).

Member Function Documentation

◆ LayoutId()

std::int64_t LayoutId ( ) const
inlinenoexcept

Gets the layout identifier for the chunks.

A value of 0 means that the layout mechanism is not used and the client must parse the chunk layout for each buffer.

Returns
Positive or 0 identifier.

◆ SetLayoutId()

void SetLayoutId ( const std::int64_t layoutId)
inline

Sets the layout identifier for the chunks.

Change the identifier if the layout/size of the chunks you send changes. This is to reduce parse time on the client side. An easy way to define such an identifier is to use a bit field for all supported chunks.

A value of 0 means that the layout mechanism is not used and the client must parse the chunk layout for each buffer.

Positive or 0 identifier.

◆ SetTotalPayloadSize()

void SetTotalPayloadSize ( int  totalPayloadSize)
inline

Sets a valid payload size over all chunks including the image chunk.

◆ TotalPayloadSize()

int TotalPayloadSize ( ) const
inlinenoexcept

Gets a valid payload size over all chunks including the image chunk.