Image Component Library (ICL)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
icl::io::pylon::PylonGrabberThread Class Reference

Internally spawned thread class for continuous grabbing. More...

#include <PylonGrabberThread.h>

Inheritance diagram for icl::io::pylon::PylonGrabberThread:
icl::utils::Thread icl::utils::ShallowCopyable< ThreadImpl, ThreadImplDelOp >

Public Member Functions

ICLIO_API PylonGrabberThread (Pylon::IStreamGrabber *grabber, PylonColorConverter *converter, PylonCameraOptions *options)
 Constructor sets all internal fields and allocates memory. More...
 
ICLIO_API ~PylonGrabberThread ()
 Destructor frees all allocated memory. More...
 
ICLIO_API void run ()
 acquires images and writes them into an internal queue More...
 
ICLIO_API void resetBuffer ()
 reinitializes buffer More...
 
ICLIO_API core::ImgBasegetCurrentImage ()
 getter for the most current image More...
 
- Public Member Functions inherited from icl::utils::Thread
 Thread ()
 Create a new Thread. More...
 
virtual ~Thread ()
 Destructor (if the thread is still running, it is ended) More...
 
void start ()
 starts the thread More...
 
virtual void stop ()
 stops the thread and waits till it is ended More...
 
void wait ()
 waits for this thread to be ended More...
 
virtual void finalize ()
 at the end of the stop function, this function is called More...
 
bool running () const
 returns the internal running state More...
 
bool runningNoLock () const
 returns the running state of the thread (without locking the mutex) More...
 
- Public Member Functions inherited from icl::utils::ShallowCopyable< ThreadImpl, ThreadImplDelOp >
bool isNull () const
 returns wheter the objects implementation holds a null pointer More...
 

Private Member Functions

void grab ()
 grabs a single image into m_BufferQueue. More...
 

Private Attributes

Pylon::IStreamGrabber * m_Grabber
 A pointer to the image-providing StreamGrabber. More...
 
PylonColorConverterm_Converter
 A pointer to the ColorConverter. More...
 
PylonCameraOptionsm_Options
 A pointer to the CameraOptions. More...
 
ConcGrabberBuffer m_Buffers
 A buffer holding read and write buffers. More...
 
int m_Error
 A counter for acquisition errors. More...
 
int m_Timeout
 A counter for acquisition timeouts. More...
 
int m_Acquired
 A counter for correct acquisitions. More...
 

Additional Inherited Members

- Public Types inherited from icl::utils::ShallowCopyable< ThreadImpl, ThreadImplDelOp >
typedef ShallowCopyable< ThreadImpl, ThreadImplDelOp > ParentSC
 
- Static Public Member Functions inherited from icl::utils::Thread
static void usleep (unsigned int usec)
 just calling usleep More...
 
static void msleep (unsigned int msecs)
 sets the current thread to sleep for some milli-seconds More...
 
static void sleep (float secs)
 sets the current thread to sleep for some seconds More...
 
- Protected Member Functions inherited from icl::utils::Thread
void exit ()
 exits the thread using pthread_exit (must be called from within the run function) More...
 
void lock ()
 internal used lock function More...
 
int trylock ()
 internal used trylock function More...
 
void unlock ()
 internal used unlock function More...
 
void join ()
 internal used join function More...
 
- Protected Member Functions inherited from icl::utils::ShallowCopyable< ThreadImpl, ThreadImplDelOp >
 ShallowCopyable (ThreadImpl *t=0)
 create a the implementation with a given T* value More...
 
- Protected Attributes inherited from icl::utils::ShallowCopyable< ThreadImpl, ThreadImplDelOp >
SmartPtrBase< ThreadImpl, ThreadImplDelOp > impl
 shared pointer for the classes implementation More...
 

Detailed Description

Internally spawned thread class for continuous grabbing.

Constructor & Destructor Documentation

◆ PylonGrabberThread()

ICLIO_API icl::io::pylon::PylonGrabberThread::PylonGrabberThread ( Pylon::IStreamGrabber *  grabber,
PylonColorConverter converter,
PylonCameraOptions options 
)

Constructor sets all internal fields and allocates memory.

Parameters
grabberThe IStreamGrabber providing the images.
converter
options

◆ ~PylonGrabberThread()

ICLIO_API icl::io::pylon::PylonGrabberThread::~PylonGrabberThread ( )

Destructor frees all allocated memory.

Member Function Documentation

◆ getCurrentImage()

ICLIO_API core::ImgBase* icl::io::pylon::PylonGrabberThread::getCurrentImage ( )

getter for the most current image

Returns
a pointer to an internally used TsBuffer the buffer can safely be used until the next call to getCurrentImage() or resetBuffer().

◆ grab()

void icl::io::pylon::PylonGrabberThread::grab ( )
private

grabs a single image into m_BufferQueue.

◆ resetBuffer()

ICLIO_API void icl::io::pylon::PylonGrabberThread::resetBuffer ( )

reinitializes buffer

◆ run()

ICLIO_API void icl::io::pylon::PylonGrabberThread::run ( )
virtual

acquires images and writes them into an internal queue

Implements icl::utils::Thread.

Member Data Documentation

◆ m_Acquired

int icl::io::pylon::PylonGrabberThread::m_Acquired
private

A counter for correct acquisitions.

◆ m_Buffers

ConcGrabberBuffer icl::io::pylon::PylonGrabberThread::m_Buffers
private

A buffer holding read and write buffers.

◆ m_Converter

PylonColorConverter* icl::io::pylon::PylonGrabberThread::m_Converter
private

A pointer to the ColorConverter.

◆ m_Error

int icl::io::pylon::PylonGrabberThread::m_Error
private

A counter for acquisition errors.

◆ m_Grabber

Pylon::IStreamGrabber* icl::io::pylon::PylonGrabberThread::m_Grabber
private

A pointer to the image-providing StreamGrabber.

◆ m_Options

PylonCameraOptions* icl::io::pylon::PylonGrabberThread::m_Options
private

A pointer to the CameraOptions.

◆ m_Timeout

int icl::io::pylon::PylonGrabberThread::m_Timeout
private

A counter for acquisition timeouts.


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