16#include <peak/dll_interface/peak_dll_interface_util.hpp>
59class BufferPart:
public std::enable_shared_from_this<BufferPart>
154 size_t Width()
const;
223 friend ClassCreator<BufferPart>;
227 std::weak_ptr<Buffer> m_parentBuffer;
241 std::string entryString;
245 entryString =
"Unknown";
249 entryString =
"Image2D";
253 entryString =
"PlaneBiPlanar2D";
257 entryString =
"PlaneTriPlanar2D";
261 entryString =
"PlaneQuadPlanar2D";
265 entryString =
"Image3D";
269 entryString =
"PlaneBiPlanar3D";
273 entryString =
"PlaneTriPlanar3D";
277 entryString =
"PlaneQuadPlanar3D";
281 entryString =
"ConfidenceMap";
285 entryString =
"Custom";
292 : m_backendHandle(bufferPartHandle)
293 , m_parentBuffer(parentBuffer)
308 return QueryRawInformationFromCInterfaceFunction([&](int32_t* dataType, uint8_t* buffer,
size_t* bufferSize) {
310 m_backendHandle, infoCommand, dataType, buffer, bufferSize);
316 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* sourceId) {
323 return QueryNumericFromCInterfaceFunction<void*>(
329 return QueryNumericFromCInterfaceFunction<size_t>(
343 return QueryNumericFromCInterfaceFunction<uint64_t>(
349 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* formatNamespace) {
356 return QueryNumericFromCInterfaceFunction<size_t>(
362 return QueryNumericFromCInterfaceFunction<size_t>(
368 return QueryNumericFromCInterfaceFunction<size_t>(
374 return QueryNumericFromCInterfaceFunction<size_t>(
380 return QueryNumericFromCInterfaceFunction<size_t>([&](
size_t* xPadding) {
387 return QueryNumericFromCInterfaceFunction<size_t>([&](
size_t* deliveredImageHeight) {
394 return LockOrThrow(m_parentBuffer);
size_t XPadding() const
Returns the x padding.
Definition peak_buffer_part.hpp:378
BufferPartType Type() const
Returns the type.
Definition peak_buffer_part.hpp:333
uint64_t FormatNamespace() const
Returns the format namespace.
Definition peak_buffer_part.hpp:347
void * BasePtr() const
Returns the base pointer.
Definition peak_buffer_part.hpp:321
size_t DeliveredImageHeight() const
Returns the delivered image height.
Definition peak_buffer_part.hpp:385
size_t YOffset() const
Returns the y offset.
Definition peak_buffer_part.hpp:372
size_t Size() const
Returns the size in bytes.
Definition peak_buffer_part.hpp:327
uint64_t SourceID() const
Returns the source ID.
Definition peak_buffer_part.hpp:314
std::shared_ptr< Buffer > ParentBuffer() const
Returns the parent buffer.
Definition peak_buffer_part.hpp:392
size_t Height() const
Returns the height.
Definition peak_buffer_part.hpp:360
~BufferPart()
Definition peak_buffer_part.hpp:296
BufferPart & operator=(const BufferPart &other)=delete
RawInformation Info(int32_t infoCommand) const
Delivers information based on the given GenTL info command.
Definition peak_buffer_part.hpp:306
size_t XOffset() const
Returns the x offset.
Definition peak_buffer_part.hpp:366
ImageView ToImageView()
Create an ImageView object from this buffer part.
Definition peak_buffer_part.hpp:301
size_t Width() const
Returns the width.
Definition peak_buffer_part.hpp:354
uint64_t Format() const
Returns the format.
Definition peak_buffer_part.hpp:341
BufferPart(BufferPart &&other)=delete
BufferPart(const BufferPart &other)=delete
BufferPart & operator=(BufferPart &&other)=delete
Implementation of the peak::common::IImageView interface for viewing image pixel data from arbitrary ...
Definition peak_image_view.hpp:55
BufferPartType
Data type of the buffer part.
Definition peak_buffer_part.hpp:36
@ PlaneBiPlanar3D
Definition peak_buffer_part.hpp:43
@ Image3D
Definition peak_buffer_part.hpp:42
@ PlaneTriPlanar2D
Definition peak_buffer_part.hpp:40
@ PlaneQuadPlanar2D
Definition peak_buffer_part.hpp:41
@ ConfidenceMap
Definition peak_buffer_part.hpp:46
@ Unknown
Definition peak_buffer_part.hpp:37
@ Custom
Definition peak_buffer_part.hpp:48
@ Image2D
Definition peak_buffer_part.hpp:38
@ PlaneTriPlanar3D
Definition peak_buffer_part.hpp:44
@ PlaneQuadPlanar3D
Definition peak_buffer_part.hpp:45
@ PlaneBiPlanar2D
Definition peak_buffer_part.hpp:39
@ Unknown
Definition peak_buffer.hpp:44
@ Custom
Definition peak_buffer.hpp:56
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:34
std::string ToString(BufferPayloadType entry)
Definition peak_buffer.hpp:557
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33
PEAK_C_API PEAK_BufferPart_GetSize(PEAK_BUFFER_PART_HANDLE bufferPartHandle, size_t *size)
Asks the given buffer part for its size.
PEAK_C_API PEAK_BufferPart_GetXOffset(PEAK_BUFFER_PART_HANDLE bufferPartHandle, size_t *xOffset)
Asks the given buffer part for its X offset.
int32_t PEAK_BUFFER_PART_TYPE
Definition peak_backend.h:80
PEAK_C_API PEAK_BufferPart_GetWidth(PEAK_BUFFER_PART_HANDLE bufferPartHandle, size_t *width)
Asks the given buffer part for its width.
PEAK_C_API PEAK_BufferPart_GetHeight(PEAK_BUFFER_PART_HANDLE bufferPartHandle, size_t *height)
Asks the given buffer part for its height.
PEAK_C_API PEAK_BufferPart_GetFormat(PEAK_BUFFER_PART_HANDLE bufferPartHandle, uint64_t *format)
Asks the given buffer part for its format.
struct PEAK_BUFFER_PART * PEAK_BUFFER_PART_HANDLE
Definition peak_backend.h:413
PEAK_C_API PEAK_BufferPart_GetFormatNamespace(PEAK_BUFFER_PART_HANDLE bufferPartHandle, uint64_t *formatNamespace)
Asks the given buffer part for its format namespace.
PEAK_C_API PEAK_BufferPart_GetDeliveredImageHeight(PEAK_BUFFER_PART_HANDLE bufferPartHandle, size_t *deliveredImageHeight)
Asks the given buffer part for its delivered image height.
PEAK_C_API PEAK_BufferPart_GetInfo(PEAK_BUFFER_PART_HANDLE bufferPartHandle, int32_t infoCommand, int32_t *infoDataType, uint8_t *info, size_t *infoSize)
Asks the given buffer part for an information based on a specific command.
PEAK_C_API PEAK_BufferPart_GetYOffset(PEAK_BUFFER_PART_HANDLE bufferPartHandle, size_t *yOffset)
Asks the given buffer part for its Y offset.
PEAK_C_API PEAK_BufferPart_GetBasePtr(PEAK_BUFFER_PART_HANDLE bufferPartHandle, void **basePtr)
Asks the given buffer part for its base pointer.
PEAK_C_API PEAK_BufferPart_GetXPadding(PEAK_BUFFER_PART_HANDLE bufferPartHandle, size_t *xPadding)
Asks the given buffer part for its X padding.
PEAK_C_API PEAK_BufferPart_GetSourceID(PEAK_BUFFER_PART_HANDLE bufferPartHandle, uint64_t *sourceId)
Asks the given buffer part for its source ID.
PEAK_C_API PEAK_BufferPart_Destruct(PEAK_BUFFER_PART_HANDLE bufferPartHandle)
Destroys the given buffer part.
PEAK_C_API PEAK_BufferPart_GetType(PEAK_BUFFER_PART_HANDLE bufferPartHandle, PEAK_BUFFER_PART_TYPE *type)
Asks the given buffer part for its type.
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:16