Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetPlainFrameGenerator Class Reference

Inheritance diagram for vetPlainFrameGenerator:

vetInput

Public Member Functions

 vetPlainFrameGenerator (float fps=0)
 Default constructor, frame rate is managed by vetInput class.
 vetPlainFrameGenerator (PixelRGB96 &background, float fps=0)
 Default constructor initialize background, frame rate is managed by vetInput class.
 vetPlainFrameGenerator (PixelGrey &background, float fps=0)
 Default constructor initialize variables and connect. to device if asked.
 ~vetPlainFrameGenerator ()
VETRESULT reset ()
 Reset current background pixels to defaults.
void useBufferYUV (unsigned int width, unsigned int height)
 Update and set current buffer (vetFrameYUV420) to new size.
void useBufferRGB (unsigned int width, unsigned int height)
 Update and set current buffer (vetFrameRGB24) to new size.
void useBufferTuC (unsigned int width, unsigned int height, vetFrame::VETFRAME_PROFILE profile)
 Update and set current buffer (vetFrameT<uchar>) to new size.
bool isBufferYUV ()
 Evaluate is current buffer is a vetFrameYUV420.
bool isBufferRGB ()
 Evaluate is current buffer is a vetFrameRGB24.
bool isBufferTuC ()
 Evaluate is current buffer is a vetFrameT<uchar>.
VETRESULT setHeight (unsigned int value)
 Set current RGB background.Read current RGB background.Set current greyscale background.Read current greyscale background.Set current canvas' height.
VETRESULT setWidth (unsigned int value)
 Set current canvas' width.
unsigned int getWidth () const
 Read current canvas's width.
unsigned int getHeight () const
 Read current canvas's height.
bool EoF ()
 Get the state of current data source.
VETRESULT extractTo (vetFrameYUV420 &img)
 Clear the frame with background pixel.
VETRESULT extractTo (vetFrameRGB24 &img)
 Clear the frame with background pixel.
VETRESULT extractTo (vetFrameT< unsigned char > &img)
 Clear the frame with background pixel.

Protected Member Functions

void releaseBuffers ()
 Close and free all buffers, then they are set to NULL.

Protected Attributes

vetFrameYUV420bufferYUV
 Our YUV buffer.
vetFrameRGB24bufferRGB
 Our RGB buffer.
vetFrameT< unsigned char > * bufferTuC
 Our "Template" buffer.

Detailed Description

Definition at line 49 of file vetPlainFrameGenerator.h.


Constructor & Destructor Documentation

vetPlainFrameGenerator::vetPlainFrameGenerator float  fps = 0  ) 
 

Default constructor, frame rate is managed by vetInput class.

Parameters:
[in] fps frame rate, default is 0: max possible

Definition at line 25 of file vetPlainFrameGenerator.cpp.

References INFO, and reset().

vetPlainFrameGenerator::vetPlainFrameGenerator PixelRGB96 background,
float  fps = 0
 

Default constructor initialize background, frame rate is managed by vetInput class.

Parameters:
[in] background RGB pixel
[in] fps frame rate, default is 0: max possible

Definition at line 38 of file vetPlainFrameGenerator.cpp.

References DEBUGMSG, and reset().

vetPlainFrameGenerator::vetPlainFrameGenerator PixelGrey &  background,
float  fps = 0
 

Default constructor initialize variables and connect. to device if asked.

Parameters:
[in] background greyscale pixel
[in] fps frame rate, default is 0: max possible

Definition at line 52 of file vetPlainFrameGenerator.cpp.

References DEBUGMSG, and reset().


Member Function Documentation

bool vetPlainFrameGenerator::EoF  )  [inline, virtual]
 

Get the state of current data source.

Returns:
false, always.

Implements vetInput.

Definition at line 225 of file vetPlainFrameGenerator.h.

VETRESULT vetPlainFrameGenerator::extractTo vetFrameT< unsigned char > &  img  )  [virtual]
 

Clear the frame with background pixel.

Parameters:
[out] img Greyscale VETLib Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameT&)

Implements vetInput.

Definition at line 329 of file vetPlainFrameGenerator.cpp.

References bufferTuC, INFO, isBufferTuC(), VETRET_ILLEGAL_USE, and VETRET_OK.

VETRESULT vetPlainFrameGenerator::extractTo vetFrameRGB24 img  )  [virtual]
 

Clear the frame with background pixel.

Parameters:
[out] img VETLib Cache24 Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameRGB24&)

Implements vetInput.

Definition at line 305 of file vetPlainFrameGenerator.cpp.

References bufferRGB, INFO, isBufferRGB(), VETRET_ILLEGAL_USE, and VETRET_OK.

VETRESULT vetPlainFrameGenerator::extractTo vetFrameYUV420 img  )  [virtual]
 

Clear the frame with background pixel.

Parameters:
[out] img VETLib Cache Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameYUV420&)

Implements vetInput.

Definition at line 281 of file vetPlainFrameGenerator.cpp.

References bufferYUV, INFO, isBufferYUV(), VETRET_ILLEGAL_USE, and VETRET_OK.

unsigned int vetPlainFrameGenerator::getHeight  )  const [virtual]
 

Read current canvas's height.

Returns:
Height in pixel.

Implements vetInput.

Definition at line 251 of file vetPlainFrameGenerator.cpp.

References bufferRGB, bufferTuC, bufferYUV, vetFrameT< T >::height, and vetFrame::height.

unsigned int vetPlainFrameGenerator::getWidth  )  const [virtual]
 

Read current canvas's width.

Returns:
Width in pixel.

Implements vetInput.

Definition at line 232 of file vetPlainFrameGenerator.cpp.

References bufferRGB, bufferTuC, bufferYUV, vetFrameT< T >::width, and vetFrame::width.

bool vetPlainFrameGenerator::isBufferRGB  )  [inline]
 

Evaluate is current buffer is a vetFrameRGB24.

Returns:
true is this is the current buffer, false else.

Definition at line 151 of file vetPlainFrameGenerator.h.

References bufferRGB.

Referenced by extractTo().

bool vetPlainFrameGenerator::isBufferTuC  )  [inline]
 

Evaluate is current buffer is a vetFrameT<uchar>.

Returns:
true is this is the current buffer, false else.

Definition at line 158 of file vetPlainFrameGenerator.h.

References bufferTuC.

Referenced by extractTo().

bool vetPlainFrameGenerator::isBufferYUV  )  [inline]
 

Evaluate is current buffer is a vetFrameYUV420.

Returns:
true is this is the current buffer, false else.

Definition at line 144 of file vetPlainFrameGenerator.h.

References bufferYUV.

Referenced by extractTo().

VETRESULT vetPlainFrameGenerator::setHeight unsigned int  value  ) 
 

Set current RGB background.Read current RGB background.Set current greyscale background.Read current greyscale background.Set current canvas' height.

Returns:
height in pixel.

Definition at line 180 of file vetPlainFrameGenerator.cpp.

References bufferRGB, bufferTuC, bufferYUV, vetFrameT< T >::reAllocCanvas(), vetFrameRGB24::reAllocCanvas(), vetFrameYUV420::reAllocCanvas(), VETRET_NOT_IMPLEMENTED, VETRET_OK, vetFrameT< T >::width, and vetFrame::width.

VETRESULT vetPlainFrameGenerator::setWidth unsigned int  value  ) 
 

Set current canvas' width.

Returns:
width in pixel.

Definition at line 206 of file vetPlainFrameGenerator.cpp.

References bufferRGB, bufferTuC, bufferYUV, vetFrameT< T >::height, vetFrame::height, vetFrameT< T >::reAllocCanvas(), vetFrameRGB24::reAllocCanvas(), vetFrameYUV420::reAllocCanvas(), VETRET_NOT_IMPLEMENTED, and VETRET_OK.

void vetPlainFrameGenerator::useBufferRGB unsigned int  width,
unsigned int  height
 

Update and set current buffer (vetFrameRGB24) to new size.

Parameters:
[in] width new buffer's width.
[in] height new buffer's height.

Definition at line 131 of file vetPlainFrameGenerator.cpp.

References bufferRGB, bufferTuC, bufferYUV, vetFrame::height, vetFrameRGB24::reAllocCanvas(), and vetFrame::width.

void vetPlainFrameGenerator::useBufferTuC unsigned int  width,
unsigned int  height,
vetFrame::VETFRAME_PROFILE  profile
 

Update and set current buffer (vetFrameT<uchar>) to new size.

Parameters:
[in] width new buffer's width.
[in] height new buffer's height.

Definition at line 155 of file vetPlainFrameGenerator.cpp.

References bufferRGB, bufferTuC, bufferYUV, vetFrameT< T >::height, vetFrameT< T >::reAllocCanvas(), and vetFrameT< T >::width.

void vetPlainFrameGenerator::useBufferYUV unsigned int  width,
unsigned int  height
 

Update and set current buffer (vetFrameYUV420) to new size.

Parameters:
[in] width new buffer's width.
[in] height new buffer's height.

Definition at line 107 of file vetPlainFrameGenerator.cpp.

References bufferRGB, bufferTuC, bufferYUV, vetFrame::height, vetFrameYUV420::reAllocCanvas(), and vetFrame::width.


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 11:59:42 2006 for VETLib by  doxygen 1.4.4