Skip to content

Pylon::CGrabResultImageT#

Module: Low Level API

Low Level API: Adapts grab result to Pylon::IImage. More…

#include <pylon/ResultImage.h>

Inherits from Pylon::IImage

Public Functions#

Name
CGrabResultImageT(GrabResultT grabResult, bool isUnique)
Creates a grab result image object.
virtual ~CGrabResultImageT()
Destroys a grab result image object.
virtual bool IsValid() const
Can be used to check whether an image is valid.
virtual EPixelType GetPixelType() const
Get the current pixel type.
virtual uint32_t GetWidth() const
Get the current number of columns in pixels.
virtual uint32_t GetHeight() const
Get the current number of rows.
virtual size_t GetPaddingX() const
Get the number of extra data bytes at the end of each row.
virtual EImageOrientation GetOrientation() const
Get the vertical orientation of the image in memory.
virtual void * GetBuffer()
Get the pointer to the buffer.
virtual const void * GetBuffer() const
Get the pointer to the buffer containing the image.
virtual size_t GetImageSize() const
Get the size of the image in bytes.
virtual bool IsUnique() const
Indicates that the referenced buffer is only referenced by this image.
virtual bool GetStride(size_t & strideBytes) const
Get the stride in bytes.

Protected Attributes#

Name
GrabResultT m_grabResult
The grab result that is adapted to IImage.
bool m_isUnique
User provided info whether the buffer is referenced only by this adapter.

Additional inherited members#

Public Functions inherited from Pylon::IImage

Name
virtual ~IImage() =0
Ensure proper destruction by using a virtual destructor.

Detailed Description#

template <typename GrabResultT >
class Pylon::CGrabResultImageT;

Low Level API: Adapts grab result to Pylon::IImage.

Public Functions Documentation#

function CGrabResultImageT#

inline CGrabResultImageT(
    GrabResultT grabResult,
    bool isUnique
)

Creates a grab result image object.

Parameters:

  • grabResult A grab result.
  • isUnique User provided info whether the buffer is referenced only by this grab result.

Error Safety:

Does not throw C++ exceptions.

function ~CGrabResultImageT#

inline virtual ~CGrabResultImageT()

Destroys a grab result image object.

function IsValid#

inline virtual bool IsValid() const

Can be used to check whether an image is valid.

Return: Returns false if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::IsValid

function GetPixelType#

inline virtual EPixelType GetPixelType() const

Get the current pixel type.

Return: Returns the pixel type or PixelType_Undefined if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetPixelType

function GetWidth#

inline virtual uint32_t GetWidth() const

Get the current number of columns in pixels.

Return: Returns the current number of columns in pixels or 0 if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetWidth

function GetHeight#

inline virtual uint32_t GetHeight() const

Get the current number of rows.

Return: Returns the current number of rows or 0 if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetHeight

function GetPaddingX#

inline virtual size_t GetPaddingX() const

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

Return: Returns the number of extra data bytes at the end of each row or 0 if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetPaddingX

function GetOrientation#

inline virtual EImageOrientation GetOrientation() const

Get the vertical orientation of the image in memory.

Return: Returns the orientation of the image or ImageOrientation_TopDown if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetOrientation

function GetBuffer#

inline virtual void * GetBuffer()

Get the pointer to the buffer.

Return: Returns the pointer to the used buffer or NULL if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetBuffer

function GetBuffer#

inline virtual const void * GetBuffer() const

Get the pointer to the buffer containing the image.

Return: Returns the pointer to the used buffer or NULL if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetBuffer

The buffer is at least as large as the value returned by GetImageSize().

function GetImageSize#

inline virtual size_t GetImageSize() const

Get the size of the image in bytes.

Return: Returns the size of the image in bytes or 0 if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetImageSize

function IsUnique#

inline virtual bool IsUnique() const

Indicates that the referenced buffer is only referenced by this image.

Return: Returns true if the referenced buffer is only referenced by this image. Returns false if the image is invalid.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::IsUnique

function GetStride#

inline virtual bool GetStride(
    size_t & strideBytes
) const

Get the stride in bytes.

Parameters:

  • strideBytes The stride in byte if it can be computed.

Return: Returns true if the stride can be computed.

Error Safety:

Does not throw C++ exceptions.

Reimplements: Pylon::CPylonImageBase::GetStride

The stride in bytes can not be computed for packed image format when the stride is not byte aligned. See also Pylon::IsPacked(). The stride in bytes can not be computed if the image is invalid.

Protected Attributes Documentation#

variable m_grabResult#

GrabResultT m_grabResult;

The grab result that is adapted to IImage.

variable m_isUnique#

bool m_isUnique;

User provided info whether the buffer is referenced only by this adapter.