Skip to content

Pylon::CGrabResultData#

Module: Instant Camera

Makes the data for one grabbed buffer available.

#include <pylon/GrabResultData.h>

Inherited by Pylon::CBaslerUniversalGrabResultData

Public Functions#

Name
bool GrabSucceeded() const
Returns true if an image has been grabbed successfully and false in the case of an error.
String_t GetErrorDescription() const
This method returns a description of the error if GrabSucceeded() returns false due to an error.
uint32_t GetErrorCode() const
This method returns the error code if GrabSucceeded() returns false due to an error.
EPayloadType GetPayloadType() const
Get the current payload type.
EPixelType GetPixelType() const
Get the current pixel type.
uint32_t GetWidth() const
Get the current number of columns.
uint32_t GetHeight() const
Get the current number of rows expressed as number of pixels.
uint32_t GetOffsetX() const
Get the current starting column.
uint32_t GetOffsetY() const
Get the current starting row.
uint32_t GetPaddingX() const
Get the number of extra data at the end of each row in bytes.
uint32_t GetPaddingY() const
Get the number of extra data at the end of the image data in bytes.
void * GetBuffer() const
Get the pointer to the buffer.
size_t GetPayloadSize() const
Get the current payload size in bytes.
size_t GetBufferSize() const
Get the size of the buffer returned by GetBuffer() in bytes.
uint64_t GetBlockID() const
Get the block ID of the grabbed frame (camera device specific).
uint64_t GetTimeStamp() const
Get the camera specific tick count (camera device specific).
bool GetStride(size_t & strideBytes) const
Get the stride in bytes.
size_t GetImageSize() const
Get the size of the image in byte.
intptr_t GetCameraContext() const
Get the context value assigned to the camera object. The context is attached to the result when it is retrieved.
int64_t GetID() const
Get the ID of the grabbed image.
int64_t GetImageNumber() const
Get the number of the image. This number is incremented when an image is retrieved using CInstantCamera::RetrieveResult().
int64_t GetNumberOfSkippedImages() const
Get the number of skipped images before this image.
bool IsChunkDataAvailable() const
Returns true if chunk data is available.
GenApi::INodeMap & GetChunkDataNodeMap() const
Get the reference to the chunk data node map connected to the result.
bool HasCRC() const
Checks if buffer has a CRC attached. This needs not be activated for the device. See the PayloadCRC16 chunk.
bool CheckCRC() const
Checks CRC sum of buffer, returns true if CRC sum is OK.
intptr_t GetBufferContext() const
Get the context value assigned to the buffer. The context is set when CInstamtCamera is using a custom buffer factory.
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.
CGrabResultDataImpl * GetGrabResultDataImpl()
virtual ~CGrabResultData()

Protected Functions#

Name
CGrabResultData()

Friends#

Name
class CGrabResultDataFactory

Public Functions Documentation#

GrabSucceeded#

bool GrabSucceeded() const

Returns true if an image has been grabbed successfully and false in the case of an error.

GetErrorDescription#

String_t GetErrorDescription() const

This method returns a description of the error if GrabSucceeded() returns false due to an error.

GetErrorCode#

uint32_t GetErrorCode() const

This method returns the error code if GrabSucceeded() returns false due to an error.

GetPayloadType#

EPayloadType GetPayloadType() const

Get the current payload type.

GetPixelType#

EPixelType GetPixelType() const

Get the current pixel type.

GetWidth#

uint32_t GetWidth() const

Get the current number of columns.

GetHeight#

uint32_t GetHeight() const

Get the current number of rows expressed as number of pixels.

GetOffsetX#

uint32_t GetOffsetX() const

Get the current starting column.

GetOffsetY#

uint32_t GetOffsetY() const

Get the current starting row.

GetPaddingX#

uint32_t GetPaddingX() const

Get the number of extra data at the end of each row in bytes.

GetPaddingY#

uint32_t GetPaddingY() const

Get the number of extra data at the end of the image data in bytes.

GetBuffer#

void * GetBuffer() const

Get the pointer to the buffer.

If the chunk data feature is activated for the device, chunk data is appended to the image data. When writing past the image section while performing image processing, the chunk data will be corrupted.

GetPayloadSize#

size_t GetPayloadSize() const

Get the current payload size in bytes.

GetBufferSize#

size_t GetBufferSize() const

Get the size of the buffer returned by GetBuffer() in bytes.

GetBlockID#

uint64_t GetBlockID() const

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

Attention: A block ID with the 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.

GetTimeStamp#

uint64_t GetTimeStamp() const

Get the camera specific tick count (camera device specific).

This describes when the image exposure was started. Cameras that do not support this feature return zero. If supported, this can be used to determine which image AOIs were acquired simultaneously.

GetStride#

bool GetStride(
    size_t & strideBytes
) const

Get the stride in bytes.

GetImageSize#

size_t GetImageSize() const

Get the size of the image in byte.

GetCameraContext#

intptr_t GetCameraContext() const

Get the context value assigned to the camera object. The context is attached to the result when it is retrieved.

GetID#

int64_t GetID() const

Get the ID of the grabbed image.

Always returns a number larger than 0. The counting starts with 1 and is never reset during the lifetime of the Instant Camera object.

GetImageNumber#

int64_t GetImageNumber() const

Get the number of the image. This number is incremented when an image is retrieved using CInstantCamera::RetrieveResult().

Always returns a number larger than 0. The counting starts with 1 and is reset with every call to CInstantCamera::StartGrabbing().

GetNumberOfSkippedImages#

int64_t GetNumberOfSkippedImages() const

Get the number of skipped images before this image.

This value can be larger than 0 if EGrabStrategy_LatestImageOnly grab strategy or GrabStrategy_LatestImages grab strategy is used. Always returns a number larger than or equal 0. This number does not include the number of images lost in case of a buffer underrun in the driver.

IsChunkDataAvailable#

bool IsChunkDataAvailable() const

Returns true if chunk data is available.

This is the case if the chunk mode is enabled for the camera device. The parameter CInstantCamera::ChunkNodeMapsEnable of the used Instant Camera object is set to true (default setting). Chunk data node maps are supported by the Transport Layer of the camera device.

GetChunkDataNodeMap#

GenApi::INodeMap & GetChunkDataNodeMap() const

Get the reference to the chunk data node map connected to the result.

An empty node map is returned when the device does not support this feature or when chunks are disabled.

HasCRC#

bool HasCRC() const

Checks if buffer has a CRC attached. This needs not be activated for the device. See the PayloadCRC16 chunk.

CheckCRC#

bool CheckCRC() const

Checks CRC sum of buffer, returns true if CRC sum is OK.

GetBufferContext#

intptr_t GetBufferContext() const

Get the context value assigned to the buffer. The context is set when CInstamtCamera is using a custom buffer factory.

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.

GetGrabResultDataImpl#

CGrabResultDataImpl * GetGrabResultDataImpl()

~CGrabResultData#

virtual ~CGrabResultData()

Protected Functions Documentation#

CGrabResultData#

CGrabResultData()

Friends#

friend CGrabResultDataFactory#

friend class CGrabResultDataFactory;

Updated on 5 July 2022 at 15:30:01