16#include <peak/dll_interface/peak_dll_interface_util.hpp>
59class BufferPart:
public std::enable_shared_from_this<BufferPart>
172 size_t Width()
const;
241 friend ClassCreator<BufferPart>;
245 std::weak_ptr<Buffer> m_parentBuffer;
259 std::string entryString;
263 entryString =
"Unknown";
267 entryString =
"Image2D";
271 entryString =
"PlaneBiPlanar2D";
275 entryString =
"PlaneTriPlanar2D";
279 entryString =
"PlaneQuadPlanar2D";
283 entryString =
"Image3D";
287 entryString =
"PlaneBiPlanar3D";
291 entryString =
"PlaneTriPlanar3D";
295 entryString =
"PlaneQuadPlanar3D";
299 entryString =
"ConfidenceMap";
303 entryString =
"Custom";
310 : m_backendHandle(bufferPartHandle)
311 , m_parentBuffer(parentBuffer)
326 return ImageView(shared_from_this(), mode);
331 return QueryRawInformationFromCInterfaceFunction([&](int32_t* dataType, uint8_t* buffer,
size_t* bufferSize) {
333 m_backendHandle, infoCommand, dataType, buffer, bufferSize);
339 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* sourceId) {
346 return QueryNumericFromCInterfaceFunction<void*>(
352 return QueryNumericFromCInterfaceFunction<size_t>(
366 return QueryNumericFromCInterfaceFunction<uint64_t>(
372 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* formatNamespace) {
379 return QueryNumericFromCInterfaceFunction<size_t>(
385 return QueryNumericFromCInterfaceFunction<size_t>(
391 return QueryNumericFromCInterfaceFunction<size_t>(
397 return QueryNumericFromCInterfaceFunction<size_t>(
403 return QueryNumericFromCInterfaceFunction<size_t>([&](
size_t* xPadding) {
410 return QueryNumericFromCInterfaceFunction<size_t>([&](
size_t* deliveredImageHeight) {
417 return LockOrThrow(m_parentBuffer);
size_t XPadding() const
Returns the x padding.
Definition peak_buffer_part.hpp:401
BufferPartType Type() const
Returns the type.
Definition peak_buffer_part.hpp:356
uint64_t FormatNamespace() const
Returns the format namespace.
Definition peak_buffer_part.hpp:370
void * BasePtr() const
Returns the base pointer.
Definition peak_buffer_part.hpp:344
size_t DeliveredImageHeight() const
Returns the delivered image height.
Definition peak_buffer_part.hpp:408
size_t YOffset() const
Returns the y offset.
Definition peak_buffer_part.hpp:395
size_t Size() const
Returns the size in bytes.
Definition peak_buffer_part.hpp:350
uint64_t SourceID() const
Returns the source ID.
Definition peak_buffer_part.hpp:337
std::shared_ptr< Buffer > ParentBuffer() const
Returns the parent buffer.
Definition peak_buffer_part.hpp:415
size_t Height() const
Returns the height.
Definition peak_buffer_part.hpp:383
~BufferPart()
Definition peak_buffer_part.hpp:314
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:329
size_t XOffset() const
Returns the x offset.
Definition peak_buffer_part.hpp:389
ImageView ToImageView()
Create an ImageView from this buffer part.
Definition peak_buffer_part.hpp:319
size_t Width() const
Returns the width.
Definition peak_buffer_part.hpp:377
uint64_t Format() const
Returns the format.
Definition peak_buffer_part.hpp:364
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:84
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:612
MetadataExtractionMode
Controls how metadata is extracted when constructing an ImageView.
Definition peak_image_view.hpp:52
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:35
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