All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
Pylon::CGrabResultImageT< GrabResultT > Class Template Reference

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

#include <pylon/ResultImage.h>

Inheritance diagram for Pylon::CGrabResultImageT< GrabResultT >:
Inheritance graph
[legend]

Public Member Functions

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

Protected Attributes

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.
 

Detailed Description

template<typename GrabResultT>
class Pylon::CGrabResultImageT< GrabResultT >

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

Constructor & Destructor Documentation

template<typename GrabResultT >
Pylon::CGrabResultImageT< GrabResultT >::CGrabResultImageT ( GrabResultT  grabResult,
bool  isUnique 
)
inline

Creates a grab result image object.

Parameters
[in]grabResultA grab result.
[in]isUniqueUser provided info whether the buffer is referenced only by this grab result.
Error Safety:
Does not throw C++ exceptions.

Member Function Documentation

template<typename GrabResultT >
virtual void* Pylon::CGrabResultImageT< GrabResultT >::GetBuffer ( )
inlinevirtual

Get the pointer to the buffer.

Returns
Returns the pointer to the used buffer or NULL if the image is invalid.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual const void* Pylon::CGrabResultImageT< GrabResultT >::GetBuffer ( ) const
inlinevirtual

Get the pointer to the buffer containing the image.

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

Returns
Returns the pointer to the used buffer or NULL if the image is invalid.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual uint32_t Pylon::CGrabResultImageT< GrabResultT >::GetHeight ( ) const
inlinevirtual

Get the current number of rows.

Returns
Returns the current number of rows or 0 if the image is invalid.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual size_t Pylon::CGrabResultImageT< GrabResultT >::GetImageSize ( ) const
inlinevirtual

Get the size of the image in bytes.

Returns
Returns the size of the image in bytes or 0 if the image is invalid.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual EImageOrientation Pylon::CGrabResultImageT< GrabResultT >::GetOrientation ( ) const
inlinevirtual

Get the vertical orientation of the image in memory.

Returns
Returns the orientation of the image or ImageOrientation_TopDown if the image is invalid.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual size_t Pylon::CGrabResultImageT< GrabResultT >::GetPaddingX ( ) const
inlinevirtual

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

Returns
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.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual EPixelType Pylon::CGrabResultImageT< GrabResultT >::GetPixelType ( ) const
inlinevirtual

Get the current pixel type.

Returns
Returns the pixel type or PixelType_Undefined if the image is invalid.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual bool Pylon::CGrabResultImageT< GrabResultT >::GetStride ( size_t &  strideBytes) const
inlinevirtual

Get the stride in bytes.

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.

Parameters
[out]strideBytesThe stride in byte if it can be computed.
Returns
Returns true if the stride can be computed.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual uint32_t Pylon::CGrabResultImageT< GrabResultT >::GetWidth ( ) const
inlinevirtual

Get the current number of columns in pixels.

Returns
Returns the current number of columns in pixels or 0 if the image is invalid.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual bool Pylon::CGrabResultImageT< GrabResultT >::IsUnique ( ) const
inlinevirtual

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

Returns
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.

Implements Pylon::IImage.

template<typename GrabResultT >
virtual bool Pylon::CGrabResultImageT< GrabResultT >::IsValid ( ) const
inlinevirtual

Can be used to check whether an image is valid.

Returns
Returns false if the image is invalid.
Error Safety:
Does not throw C++ exceptions.

Implements Pylon::IImage.


The documentation for this class was generated from the following file:

pylon 5.0.5
Copyright © 2006-2016 Basler AG (Thu Aug 11 2016 18:01:28)