16#include <peak/dll_interface/peak_dll_interface_util.hpp>
57class BufferPart:
public std::enable_shared_from_this<BufferPart>
152 size_t Width()
const;
221 friend ClassCreator<BufferPart>;
225 std::weak_ptr<Buffer> m_parentBuffer;
239 std::string entryString;
243 entryString =
"Unknown";
247 entryString =
"Image2D";
251 entryString =
"PlaneBiPlanar2D";
255 entryString =
"PlaneTriPlanar2D";
259 entryString =
"PlaneQuadPlanar2D";
263 entryString =
"Image3D";
267 entryString =
"PlaneBiPlanar3D";
271 entryString =
"PlaneTriPlanar3D";
275 entryString =
"PlaneQuadPlanar3D";
279 entryString =
"ConfidenceMap";
283 entryString =
"Custom";
290 : m_backendHandle(bufferPartHandle)
291 , m_parentBuffer(parentBuffer)
306 return QueryRawInformationFromCInterfaceFunction([&](int32_t* dataType, uint8_t* buffer,
size_t* bufferSize) {
308 m_backendHandle, infoCommand, dataType, buffer, bufferSize);
314 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* sourceId) {
321 return QueryNumericFromCInterfaceFunction<void*>(
327 return QueryNumericFromCInterfaceFunction<size_t>(
341 return QueryNumericFromCInterfaceFunction<uint64_t>(
347 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* formatNamespace) {
354 return QueryNumericFromCInterfaceFunction<size_t>(
360 return QueryNumericFromCInterfaceFunction<size_t>(
366 return QueryNumericFromCInterfaceFunction<size_t>(
372 return QueryNumericFromCInterfaceFunction<size_t>(
378 return QueryNumericFromCInterfaceFunction<size_t>([&](
size_t* xPadding) {
385 return QueryNumericFromCInterfaceFunction<size_t>([&](
size_t* deliveredImageHeight) {
392 return LockOrThrow(m_parentBuffer);
size_t XPadding() const
Returns the x padding.
Definition peak_buffer_part.hpp:376
BufferPartType Type() const
Returns the type.
Definition peak_buffer_part.hpp:331
uint64_t FormatNamespace() const
Returns the format namespace.
Definition peak_buffer_part.hpp:345
void * BasePtr() const
Returns the base pointer.
Definition peak_buffer_part.hpp:319
size_t DeliveredImageHeight() const
Returns the delivered image height.
Definition peak_buffer_part.hpp:383
size_t YOffset() const
Returns the y offset.
Definition peak_buffer_part.hpp:370
size_t Size() const
Returns the size in bytes.
Definition peak_buffer_part.hpp:325
uint64_t SourceID() const
Returns the source ID.
Definition peak_buffer_part.hpp:312
std::shared_ptr< Buffer > ParentBuffer() const
Returns the parent buffer.
Definition peak_buffer_part.hpp:390
size_t Height() const
Returns the height.
Definition peak_buffer_part.hpp:358
~BufferPart()
Definition peak_buffer_part.hpp:294
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:304
size_t XOffset() const
Returns the x offset.
Definition peak_buffer_part.hpp:364
ImageView ToImageView()
Create an ImageView object from this buffer part.
Definition peak_buffer_part.hpp:299
size_t Width() const
Returns the width.
Definition peak_buffer_part.hpp:352
uint64_t Format() const
Returns the format.
Definition peak_buffer_part.hpp:339
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:44
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:34
BufferPartType
Data type of the buffer part.
Definition peak_buffer_part.hpp:35
@ PlaneBiPlanar3D
Definition peak_buffer_part.hpp:42
@ Image3D
Definition peak_buffer_part.hpp:41
@ PlaneTriPlanar2D
Definition peak_buffer_part.hpp:39
@ PlaneQuadPlanar2D
Definition peak_buffer_part.hpp:40
@ ConfidenceMap
Definition peak_buffer_part.hpp:45
@ Unknown
Definition peak_buffer_part.hpp:36
@ Custom
Definition peak_buffer_part.hpp:47
@ Image2D
Definition peak_buffer_part.hpp:37
@ PlaneTriPlanar3D
Definition peak_buffer_part.hpp:43
@ PlaneQuadPlanar3D
Definition peak_buffer_part.hpp:44
@ PlaneBiPlanar2D
Definition peak_buffer_part.hpp:38
std::string ToString(BufferPayloadType entry)
Definition peak_buffer.hpp:554
@ Unknown
Definition peak_buffer.hpp:43
@ Custom
Definition peak_buffer.hpp:55
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