TLIB documentation
 

tlSourceFiles Class Reference

Inheritance diagram for tlSourceFiles:

Inheritance graph
[legend]
Collaboration diagram for tlSourceFiles:

Collaboration graph
[legend]

List of all members.


Detailed Description

Filesystem digitizer class.

Public Member Functions

 tlSourceFiles ()
 tlSourceFiles (char *filename)
virtual ~tlSourceFiles ()
int getLength ()
int getIndex ()
int open ()
int open (char *filename)
int setIndex (int index)
int setFrameRate (int fps)
virtual int grab (tlImage *image)
virtual int grab (tlImage *image, tlRect *rect)
virtual int grabQueued (tlImage *image)
virtual int grabQueued (tlImage *image, tlRect *rect)

Constructor & Destructor Documentation

tlSourceFiles::tlSourceFiles (  ) 

Constructor.

Note:
See error management for details.

tlSourceFiles::tlSourceFiles ( char *  filenameBase  ) 

Constructor.

Returns:
See error management for details.

tlSourceFiles::~tlSourceFiles (  )  [virtual]

Destructor.

Note:
See error management for details.


Member Function Documentation

tlSourceFiles::getLength (  )  [inline]

Return the length of the image if it is known. The full set must be grabbed once before the length is known.

Returns:
The file set length if it is known, -1 otherwise. See error management for details.

tlSourceFiles::getIndex (  )  [inline]

Return the current index in the file set.

Returns:
The position in the file set.
See error management for details.

int tlSourceFiles::open (  ) 

Open the first file of the serie using the default basename.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlSourceFiles::open ( char *  filenameBase  ) 

Open the first file of the serie using the default basename.

Returns:
0 on success, -1 otherwise.
See error management for details.

int tlSourceFiles::setIndex ( int  index  ) 

Set the current frame index. The image at the given index will be returned at the next grab() call.

Parameters:
index desired frame index.
Returns:
0 on success, -1 otherwise.
See error management for details.

int tlSourceFiles::setFrameRate ( int  fps  ) 

Set the "frame rate" of the filesystem digitizer by "throttling" the acquisition.

Parameters:
fps frame rate in frame per second.
Returns:
0 on success, -1 otherwise.
See error management for details.
Note:
Throttle code depends on the main TLIB application timer. So, if the user calls tl_timer_init(), the frame rate will be messed up.

int tlSourceFiles::grab ( tlImage image  )  [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.

Implements tlSource.

int tlSourceFiles::grab ( tlImage image,
tlRect rect 
) [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.

Implements tlSource.

int tlSourceFiles::grabQueued ( tlImage image  )  [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.

Implements tlSource.

int tlSourceFiles::grabQueued ( tlImage image,
tlRect rect 
) [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.

Implements tlSource.


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.