GeneralViewer< InputType > Class Template Reference
[General helper classes and structs.]

class GeneralViewer: A debugging tool; uses CImg for viewing the data flow at some point along the pipeline. More...

#include <GeneralViewer.h>

Inheritance diagram for GeneralViewer< InputType >:

DestPipelinePlugin< InputType > List of all members.

Public Member Functions

 GeneralViewer (FrameProducer< InputType > *inputProducer, CoordSpace2DMap viewMap, const char *title)
 Constructor.
virtual ~GeneralViewer ()
 Destructor.
void getMouse (int &x, int &y)
 Gets the current position of the mouse relative to the viewer's window.
void waitForEvent ()
 Blocks the calling thread until an event occurs within the viewer's window.
int checkMouseButton ()
 Check the status of the mouse buttons.
int userFunction (const char *functionTitle,...)
 Permits subclasses to create special functionality by redefining this method's behavior.

Protected Member Functions

void clearBuffer ()
 Clear the viewer's image buffer.
void setBuffer (const unsigned char *data)
 Set the pixels of the viewer's image buffer.
void display ()
 Refresh the viewer's image buffer.
void map_coord (double &x, double &y)
 Convert the input coordinates in place by the mapping specified in the constructor.

Protected Attributes

int viewerWidth
 width of the viewer's image buffer.
int viewerHeight
 height of the viewer's image buffer.
CImg< unsigned char > viewBuffer
 CImg data element that contains the image buffer of the viewer.

Detailed Description

template<class InputType>
class GeneralViewer< InputType >

class GeneralViewer: A debugging tool; uses CImg for viewing the data flow at some point along the pipeline.


Constructor & Destructor Documentation

template<class InputType>
GeneralViewer< InputType >::GeneralViewer FrameProducer< InputType > *  inputProducer,
CoordSpace2DMap  viewMap,
const char *  title
 

Constructor.

Parameters:
[in] inputProducer pointer to a FrameProducer of frames of type InputType.
[in] viewMap the mapping from coordinates in a frame of type InputType to screen coordinates.
[in] title the title for the window in which the frame data will be displayed.


Member Function Documentation

template<class InputType>
int GeneralViewer< InputType >::checkMouseButton  ) 
 

Check the status of the mouse buttons.

Returns:
the current mouse button state. Refer to the Cimg documentation for mouse button codes.

template<class InputType>
void GeneralViewer< InputType >::getMouse int &  x,
int &  y
 

Gets the current position of the mouse relative to the viewer's window.

Parameters:
[out] x the x coordinate.
[out] y the y coordinate.

template<class InputType>
void GeneralViewer< InputType >::map_coord double &  x,
double &  y
[protected]
 

Convert the input coordinates in place by the mapping specified in the constructor.

Parameters:
[in,out] x the x coordinate to be converted.
[in,out] y the y coordinate to be converted.

template<class InputType>
void GeneralViewer< InputType >::setBuffer const unsigned char *  data  )  [protected]
 

Set the pixels of the viewer's image buffer.

Parameters:
[in] data the pixel data to copy into the viewer's image buffer.


The documentation for this class was generated from the following file:
Generated on Wed Mar 15 08:01:31 2006 for pvclib by  doxygen 1.4.6-NO