3#include "../_cexports/c_gev_server.h"
4#include "../global.hpp"
5#include "../point_2d.hpp"
6#include "../size_2d.hpp"
7#include "../pfnc_format.hpp"
57 if (pixelFormat == PfncFormat::InvalidPixelFormat)
60 data_ = CExports::GSImageDataBlock{{CExports::TGSPayloadType::GSPT_Image},
61 static_cast<CExports::cvbuint32_t
>(pixelFormat),
62 static_cast<CExports::cvbuint32_t
>(size.
Width()),
63 static_cast<CExports::cvbuint32_t
>(size.
Height()),
77 if (pixelFormat == PfncFormat::InvalidPixelFormat)
80 data_.PixelFormat =
static_cast<CExports::cvbuint32_t
>(pixelFormat);
86 return Size2D<int>(
static_cast<int>(data_.Width),
static_cast<int>(data_.Height));
97 data_.Width =
static_cast<CExports::cvbuint32_t
>(size.
Width());
98 data_.Height =
static_cast<CExports::cvbuint32_t
>(size.
Height());
108 return Point2D<int>(
static_cast<int>(data_.XOffset),
static_cast<int>(data_.YOffset));
123 data_.XOffset =
static_cast<CExports::cvbuint32_t
>(point.
X());
124 data_.YOffset =
static_cast<CExports::cvbuint32_t
>(point.
Y());
137 int LinePadding() const noexcept {
return static_cast<int>(data_.XPadding); }
149 void SetLinePadding(
int padding) { data_.XPadding =
static_cast<CExports::cvbuint32_t
>(padding); }
153 CExports::GSImageDataBlock ImageDataBlock() {
return data_; }
155 CExports::GSImageDataBlock data_;
Data type description for an image plane.
Definition: data_type.hpp:28
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibl...
Definition: chunk_image_buffer_description.hpp:30
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer.
Definition: image_buffer_description.hpp:24
int LinePadding() const noexcept
Gets the line padding.
Definition: image_buffer_description.hpp:137
void SetLinePadding(int padding)
Sets the line padding.
Definition: image_buffer_description.hpp:149
PfncFormat PixelFormat() const noexcept
Gets the image pixel format value.
Definition: image_buffer_description.hpp:72
void SetPixelFormat(const PfncFormat &pixelFormat)
Sets the image pixel format value.
Definition: image_buffer_description.hpp:75
void SetOffset(Point2D< int > point)
Set the image's offset on the sensor.
Definition: image_buffer_description.hpp:116
void SetSize(const Size2D< int > &size)
Sets the image size.
Definition: image_buffer_description.hpp:90
ImageBufferDescription(Size2D< int > size, ColorModel colorModel, DataType dataType)
Creates a default image buffer description.
Definition: image_buffer_description.hpp:41
Size2D< int > Size() const noexcept
Gets the image size.
Definition: image_buffer_description.hpp:84
ImageBufferDescription(Size2D< int > size, PfncFormat pixelFormat)
Creates a default image buffer description.
Definition: image_buffer_description.hpp:51
Point2D< int > Offset() const noexcept
Get the image's offset on the sensor.
Definition: image_buffer_description.hpp:106
The stream to send Images or other data.
Definition: decl_stream.hpp:19
T X() const noexcept
Gets the x-component of the point.
Definition: point_2d.hpp:86
T Y() const noexcept
Gets the y-component of the point.
Definition: point_2d.hpp:106
T Height() const noexcept
Gets the vertical component of the size.
Definition: size_2d.hpp:79
T Width() const noexcept
Gets the horizontal component of the size.
Definition: size_2d.hpp:59
PfncFormat
GenICam Pixel Format Naming Convention (PFNC) format values.
Definition: pfnc_format.hpp:21
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24
ColorModel
Color model that this image is using.
Definition: global.hpp:151