TLIB documentation
 

tlSource Class Reference

Inheritance diagram for tlSource:

Inheritance graph
[legend]

List of all members.


Detailed Description

Image acquisition base class.

This is the base class for any image acquisition for TLIB. It is used by tlDigitizer, tlCamera, tlSourceVideoFile and tlSourceFiles. You should only use tlSource as a base class to implement your own image acquisition interface.

Public Member Functions

 tlSource ()
virtual ~tlSource ()
int getWidth ()
int getHeight ()
int getID ()
tl_format getFormat ()
virtual int grab (tlImage *image)=0
virtual int grab (tlImage *image, tlRect *rect)=0
virtual int grabQueued (tlImage *image)=0
virtual int grabQueued (tlImage *image, tlRect *rect)=0


Constructor & Destructor Documentation

tlSource::tlSource (  ) 

Base class constructor.

Note:
See error management for details.

tlSource::~tlSource (  )  [virtual]

Base class destructor.

Note:
See error management for details.


Member Function Documentation

tlSource::getWidth (  )  [inline]

Returns the width of the image source. Any image acquired through this tlSource object will have the current width.

Returns:
The width in pixels of the image source.
See error management for details.

tlSource::getHeight (  )  [inline]

Returns the height of the image source. Any image acquired through this tlSource object will have the current height.

Returns:
The height in pixels of the image source.
See error management for details.

tlSource::getID (  )  [inline]

Return a unique identifier for this source. Identifiers are allocated dynamically and are only valid during application run-time.

Returns:
A unique numerical identifier on success, -1 otherwise.
See error management for details.

tlSource::getFormat (  )  [inline]

Returns the format of the image source. Any image acquired through this tlSource object will have the current format.

Returns:
The format of the image source.

tlSource::grab ( tlImage image  )  [pure virtual]

This call acquires a full image from an image source. The image will have the size and format the source is currently configured for.

Parameters:
image [out] a valid image pointer that will receive the image.
Returns:
0 on success, -1 otherwise.
See error management for details.

Implemented in tlCamera, tlCameraStereo, tlCameraSVS, tlCameraSVSBase, tlCameraSVSHead, tlCameraTSAI, tlDigitizer, tlDigitizerDT3130, tlDigitizerDX, tlDigitizerPXC200, tlDigitizerV4L, tlDigitizerV4L2, tlDigitizerVRm, tlSourceFiles, and tlSourceVideoFile.

tlSource::grab ( tlImage image,
tlRect rect 
) [pure virtual]

This call acquires a portion of an image from an image source. The image will have the size and format the source is currently configured for, but only the portion defined by the rect argument will contain valid pixel values.

Parameters:
image [out] a valid image pointer that will receive the image.
rect a pointer to the portion of the image to acquire.
Returns:
0 on success, -1 otherwise.
See error management for details.

Implemented in tlCamera, tlCameraStereo, tlCameraSVS, tlCameraSVSBase, tlCameraSVSHead, tlCameraTSAI, tlDigitizer, tlDigitizerDT3130, tlDigitizerDX, tlDigitizerPXC200, tlDigitizerV4L, tlDigitizerV4L2, tlDigitizerVRm, tlSourceFiles, and tlSourceVideoFile.

tlSource::grabQueued ( tlImage image  )  [pure virtual]

This call acquires a full image from an image source. The image will have the size and format the source is currently configured for.

Parameters:
image [out] a valid image pointer that will receive the image.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
This routine is faster than grab() because image acquisition happens in the background. However, since the grab command is sent to the grabber during the previous call to the grabQueued() routine, the image returned can be out-of-date.

Implemented in tlCamera, tlCameraStereo, tlCameraSVS, tlCameraSVSBase, tlCameraSVSHead, tlCameraTSAI, tlDigitizer, tlDigitizerDT3130, tlDigitizerDX, tlDigitizerPXC200, tlDigitizerV4L, tlDigitizerV4L2, tlDigitizerVRm, tlSourceFiles, and tlSourceVideoFile.

tlSource::grabQueued ( tlImage image,
tlRect rect 
) [pure virtual]

This call acquires a portion of an image from an image source. The image will have the size and format the source is currently configured for, but only the portion defined by the rect argument will contain valid pixel values.

Parameters:
image [out] a valid image pointer that will receive the image.
rect a pointer to the portion of the image to acquire.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
This routine is faster than grab() because image acquisition happens in the background. However, since the grab command is sent to the grabber during the previous call to the grabQueued() routine, the image returned can be out-of-date.

Implemented in tlCamera, tlCameraStereo, tlCameraSVS, tlCameraSVSBase, tlCameraSVSHead, tlCameraTSAI, tlDigitizer, tlDigitizerDT3130, tlDigitizerDX, tlDigitizerPXC200, tlDigitizerV4L, tlDigitizerV4L2, tlDigitizerVRm, tlSourceFiles, and tlSourceVideoFile.


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

TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.