TLIB documentation
 

tlDigitizerVRm Class Reference

Inheritance diagram for tlDigitizerVRm:

Inheritance graph
[legend]
Collaboration diagram for tlDigitizerVRm:

Collaboration graph
[legend]

List of all members.


Detailed Description

VRMagic digitizer interface for TLIB.

Public Member Functions

 tlDigitizerVRm ()
virtual ~tlDigitizerVRm ()
virtual int open (int index=0)
virtual int close ()
virtual int grab (tlImage *image)
virtual int grab (tlImage *image, tlRect *rect)
virtual int grabQueued (tlImage *image)
virtual int grabQueued (tlImage *image, tlRect *rect)
virtual int open (int width, int height, int index=0)
unsigned short getInput ()
int getChannel ()
virtual int setChannel (int channel, unsigned short input)
virtual int setInput (unsigned short input)
virtual int setFrameRate (int fps)
virtual int setSize (int width, int height)
int getWidth ()
int getHeight ()
int getID ()
tl_format getFormat ()

Protected Attributes

bool isOpen

Constructor & Destructor Documentation

tlDigitizerVRm::tlDigitizerVRm (  ) 

Prepare a digitizer for image acquisition using a given acquisition size. A subsequent call to open() will open the digitizer with the given settings.

Note:
See error management for details.

tlDigitizerVRm::~tlDigitizerVRm (  )  [virtual]

Note:
See error management for details.


Member Function Documentation

int tlDigitizerVRm::open ( int  index = 0  )  [virtual]

Open a digitizer for image acquisition using default settings.

Parameters:
index [default=0] the index of the digitizer in the system (for use of multiple digitizers at the same time)
Returns:
0 on success, -1 otherwise.
See error management for details.

Implements tlDigitizer.

int tlDigitizerVRm::close (  )  [virtual]

Clean up digitizer buffers and close hardware connection. Configuration is retained, so that a call to open() will restore the digitizer state to the last used mode.

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

Implements tlDigitizer.

int tlDigitizerVRm::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 tlDigitizer.

int tlDigitizerVRm::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 tlDigitizer.

int tlDigitizerVRm::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 tlDigitizer.

int tlDigitizerVRm::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 tlDigitizer.

int tlDigitizer::open ( int  width,
int  height,
int  index = 0 
) [virtual, inherited]

Open a digitizer for image acquisition using a given acquisition size.

Parameters:
width new acquisition width
height new acquisition height
index [default=0] the index of the digitizer in the system (for use of multiple digitizers at the same time)
Returns:
0 on success, -1 otherwise.
See error management for details.

Reimplemented in tlDigitizerDT3130, tlDigitizerDX, tlDigitizerPXC200, tlDigitizerV4L, and tlDigitizerV4L2.

tlDigitizer::getInput (  )  [inline, inherited]

Get the input format used on the currently open channel.

Returns:
The input format in use.

tlDigitizer::getChannel (  )  [inline, inherited]

Get currently selected input channel.

Returns:
The input channel in use.

int tlDigitizer::setChannel ( int  channel,
unsigned short  input 
) [virtual, inherited]

Set the acquisition channel.

Parameters:
channel channel index on the digitizer
input input format
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
TLIB input formats

Reimplemented in tlDigitizerDT3130, tlDigitizerPXC200, tlDigitizerV4L, and tlDigitizerV4L2.

int tlDigitizer::setInput ( unsigned short  input  )  [virtual, inherited]

Set the acquisition channel input format.

Parameters:
input input format
Returns:
0 on success, -1 otherwise.
See error management for details.
See also:
TLIB input formats

Reimplemented in tlDigitizerDT3130, tlDigitizerPXC200, tlDigitizerV4L, and tlDigitizerV4L2.

int tlDigitizer::setFrameRate ( int  fps  )  [virtual, inherited]

Set the acquisition frame rate.

Parameters:
fps desired frames per second
Returns:
0 on success, -1 otherwise.
See error management for details.

Reimplemented in tlDigitizerDT3130, tlDigitizerDX, tlDigitizerPXC200, and tlDigitizerV4L.

int tlDigitizer::setSize ( int  width,
int  height 
) [virtual, inherited]

Set the digitizer acquisition size. All other parameters are left untouched. Depending on the hardware, this call might close and reopen the device, possibly leading to some latency.

Parameters:
width new acquisition width
height new acquisition height
Returns:
0 on success, -1 otherwise.
See error management for details.

Reimplemented in tlDigitizerDT3130, tlDigitizerDX, tlDigitizerPXC200, tlDigitizerV4L, and tlDigitizerV4L2.

tlSource::getWidth (  )  [inline, inherited]

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, inherited]

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, inherited]

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, inherited]

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.


Member Data Documentation

tlDigitizer::isOpen [protected, inherited]

Return the current state of the digitizer.

Returns:
True if digitizer is currently open,
False otherwise.


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.