Skip to content

Pylon::GrabResult#

Module: Low Level API

Low Level API: A grab result that combines the used image buffer and status information. More…

#include <pylon/Result.h>

Public Functions#

Name
GrabResult()
~GrabResult()
bool Succeeded() const
True if status is grabbed.
StreamBufferHandle Handle() const
Get the buffer handle.
void * Buffer() const
Get the pointer to the buffer.
EGrabStatus Status() const
Get the grab status.
const void * Context() const
Get the pointer the user provided context.
EPayloadType GetPayloadType() const
Get the actual payload type.
EPixelType GetPixelType() const
Get the actual pixel type. This is only defined in case of image data.
uint64_t GetTimeStamp() const
Get the camera specific tick count.
int32_t GetSizeX() const
Get the actual number of columns in pixel. This is only defined in case of image data.
int32_t GetSizeY() const
Get the actual number of rows in pixel. This is only defined in case of image data.
int32_t GetOffsetX() const
Get the actual starting column. This is only defined in case of image data.
int32_t GetOffsetY() const
Get the actual starting row. This is only defined in case of image data.
int32_t GetPaddingX() const
Get the number of extra data at the end of each row in bytes. This is only defined in case of image data.
int32_t GetPaddingY() const
Get the number of extra data at the end of the image data in bytes. This is only defined in case of image data.
int64_t GetPayloadSize() const
Get the number of valid bytes in the buffer returned by Buffer().
size_t GetPayloadSize_t() const
Get the number of valid bytes in the buffer returned by Buffer() as size_t.
String_t GetErrorDescription() const
Get a description of the current error.
uint32_t GetErrorCode() const
Get the current error code.
CGrabResultImageRef GetImage() const
Provides an adapter from the grab result to Pylon::IImage interface.
uint64_t GetBlockID() const
Get the block ID of the grabbed frame (camera device specific).
CPylonDataContainer GetDataContainer() const
Returns the grab result as a CPylonDataContainer.
size_t GetDataComponentCount() const
Returns the number of components contained in the container.
CPylonDataComponent GetDataComponent(size_t index)
Returns a specific component from the container.
size_t GetBufferSize() const
Get the size of the buffer returned by Buffer().

Protected Attributes#

Name
const void * m_pContext
StreamBufferHandle m_hBuffer
const void * m_pBuffer
size_t m_BufferSize
EGrabStatus m_Status
EPayloadType m_PayloadType
EPixelType m_PixelType
uint64_t m_TimeStamp
int32_t m_SizeX
int32_t m_SizeY
int32_t m_OffsetX
int32_t m_OffsetY
int32_t m_PaddingX
int32_t m_PaddingY
uint64_t m_PayloadSize
uint32_t m_ErrorCode
String_t m_ErrorDescription
uint64_t m_BlockID

Detailed Description#

class Pylon::GrabResult;

Low Level API: A grab result that combines the used image buffer and status information.

Note that depending on the used interface technology, the specific camera and the situation some of the attributes are not meaningful, e. g. timestamp in case of an canceled grab.

Public Functions Documentation#

GrabResult#

inline GrabResult()

~GrabResult#

inline ~GrabResult()

Succeeded#

inline bool Succeeded() const

True if status is grabbed.

Handle#

inline StreamBufferHandle Handle() const

Get the buffer handle.

Buffer#

inline void * Buffer() const

Get the pointer to the buffer.

Status#

inline EGrabStatus Status() const

Get the grab status.

Context#

inline const void * Context() const

Get the pointer the user provided context.

GetPayloadType#

inline EPayloadType GetPayloadType() const

Get the actual payload type.

GetPixelType#

inline EPixelType GetPixelType() const

Get the actual pixel type. This is only defined in case of image data.

GetTimeStamp#

inline uint64_t GetTimeStamp() const

Get the camera specific tick count.

In case of GigE-Vision this describes when the image exposure was started. Cameras that do not support this feature return zero. If supported this may be used to determine which ROIs were acquired simultaneously.

GetSizeX#

inline int32_t GetSizeX() const

Get the actual number of columns in pixel. This is only defined in case of image data.

GetSizeY#

inline int32_t GetSizeY() const

Get the actual number of rows in pixel. This is only defined in case of image data.

GetOffsetX#

inline int32_t GetOffsetX() const

Get the actual starting column. This is only defined in case of image data.

GetOffsetY#

inline int32_t GetOffsetY() const

Get the actual starting row. This is only defined in case of image data.

GetPaddingX#

inline int32_t GetPaddingX() const

Get the number of extra data at the end of each row in bytes. This is only defined in case of image data.

GetPaddingY#

inline int32_t GetPaddingY() const

Get the number of extra data at the end of the image data in bytes. This is only defined in case of image data.

GetPayloadSize#

inline int64_t GetPayloadSize() const

Get the number of valid bytes in the buffer returned by Buffer().

GetPayloadSize_t#

inline size_t GetPayloadSize_t() const

Get the number of valid bytes in the buffer returned by Buffer() as size_t.

GetErrorDescription#

inline String_t GetErrorDescription() const

Get a description of the current error.

GetErrorCode#

inline uint32_t GetErrorCode() const

Get the current error code.

GetImage#

inline CGrabResultImageRef GetImage() const

Provides an adapter from the grab result to Pylon::IImage interface.

Attention: The returned reference is only valid as long the grab result is not destroyed.

This returned adapter allows passing the grab result to saving functions or image format converter.

GetBlockID#

inline uint64_t GetBlockID() const

Get the block ID of the grabbed frame (camera device specific).

Attention: A block ID of value UINT64_MAX indicates that the Block ID is invalid and must not be used.

IEEE 1394 Camera Devices

The value of block ID is always UINT64_MAX.

GigE Camera Devices

The sequence number starts with 1 and wraps at 65535. The value 0 has a special meaning and indicates that this feature is not supported by the camera.

USB Camera Devices

The sequence number starts with 0 and uses the full 64 Bit range.

GetDataContainer#

CPylonDataContainer GetDataContainer() const

Returns the grab result as a CPylonDataContainer.

GetDataComponentCount#

size_t GetDataComponentCount() const

Returns the number of components contained in the container.

Return: Returns the number of components contained in the container.

Error Safety:

Does not throw C++ exceptions.

Thread Safety:

This class is not thread-safe. If you access the same instance from multiple threads, you must make sure to synchronize the access accordingly.

You can use the return value to iterate over the existing components by calling Pylon::CPylonDataContainer::GetDataComponent().

GetDataComponent#

CPylonDataComponent GetDataComponent(
    size_t index
)

Returns a specific component from the container.

Parameters:

  • index Index of the component to return. The index must be less than the value returned by Pylon::CPylonDataContainer::GetComponentCount().

Return: Returns the component specified by the index parameter.

Error Safety:

Throws an exception if the index parameter is out of range. Can throw exceptions in low-memory conditions.

Thread Safety:

This class is not thread-safe. If you access the same instance from multiple threads, you must make sure to synchronize the access accordingly.

GetBufferSize#

inline size_t GetBufferSize() const

Get the size of the buffer returned by Buffer().

Protected Attributes Documentation#

m_pContext#

const void * m_pContext;

m_hBuffer#

StreamBufferHandle m_hBuffer;

m_pBuffer#

const void * m_pBuffer;

m_BufferSize#

size_t m_BufferSize;

m_Status#

EGrabStatus m_Status;

m_PayloadType#

EPayloadType m_PayloadType;

m_PixelType#

EPixelType m_PixelType;

m_TimeStamp#

uint64_t m_TimeStamp;

m_SizeX#

int32_t m_SizeX;

m_SizeY#

int32_t m_SizeY;

m_OffsetX#

int32_t m_OffsetX;

m_OffsetY#

int32_t m_OffsetY;

m_PaddingX#

int32_t m_PaddingX;

m_PaddingY#

int32_t m_PaddingY;

m_PayloadSize#

uint64_t m_PayloadSize;

m_ErrorCode#

uint32_t m_ErrorCode;

m_ErrorDescription#

String_t m_ErrorDescription;

m_BlockID#

uint64_t m_BlockID;

Updated on 5 July 2022 at 15:30:01