OpenCVImageAdapter Class Reference

Provides an interface to images from the OpenCV library. More...

#include <OpenCVImageAdapter.h>

Inheritance diagram for OpenCVImageAdapter:

OvImageAdapter List of all members.

Public Member Functions

 OpenCVImageAdapter (IplImage *im)
virtual ~OpenCVImageAdapter ()
virtual double getPixel (int row, int column, int channel) const
virtual void setPixel (double value, int row, int column, int channel)

Protected Member Functions

template<typename T>
double getPixelT (int row, int column, int channel) const
template<typename T>
void setPixelT (double value, int row, int column, int channel)
double getPixeldoNothing (int row, int column, int channel) const
void setPixeldoNothing (double value, int row, int column, int channel)

Protected Attributes

IplImage * mIplImage
double(OpenCVImageAdapter::* getPixelfptr )(int row, int column, int channel) const
void(OpenCVImageAdapter::* setPixelfptr )(double value, int row, int column, int channel)

Detailed Description

Provides an interface to images from the OpenCV library.

The OpenCVImageAdapter class is inherited from the OvImageAdapter and provides a wrapper around OpenCV's IplImage allowing the OpenVis3D library functions to access the dimensions and datatype of the image, and provides get and set methods to alter image pixels.

See also:
OvImageAdapter
Author:
Abhijit Ogale


Constructor & Destructor Documentation

OpenCVImageAdapter::OpenCVImageAdapter ( IplImage *  im  ) 

to prevent the default constructor from being used

OpenCVImageAdapter::~OpenCVImageAdapter (  )  [virtual]

Destructor.


Member Function Documentation

double OpenCVImageAdapter::getPixel ( int  row,
int  column,
int  channel 
) const [virtual]

Returns a pixel value at a particular row, column and color channel.

Parameters:
row row of the image
column column of the image
channel channel of the image
Returns:
pixel value (type double)

Implements OvImageAdapter.

double OpenCVImageAdapter::getPixeldoNothing ( int  row,
int  column,
int  channel 
) const [protected]

Dummy function for use when internal IplImage pointer is null or data type unknown.

Parameters:
row row of the image
column column of the image
channel channel of the image
Returns:
pixel value (type double)

template<class T>
double OpenCVImageAdapter::getPixelT ( int  row,
int  column,
int  channel 
) const [protected]

Internal template function to handle any image datatype. Returns a pixel value at a particular row, column and color channel.

Parameters:
row row of the image
column column of the image
channel channel of the image
Returns:
pixel value (type double)

void OpenCVImageAdapter::setPixel ( double  value,
int  row,
int  column,
int  channel 
) [virtual]

Sets a pixel value at a particular row, column and color channel.

Parameters:
value value to be set
row row of the image
column column of the image
channel channel of the image

Implements OvImageAdapter.

void OpenCVImageAdapter::setPixeldoNothing ( double  value,
int  row,
int  column,
int  channel 
) [protected]

Dummy function for use when internal IplImage pointer is null or data type unknown.

Parameters:
value value to be set
row row of the image
column column of the image
channel channel of the image

template<class T>
void OpenCVImageAdapter::setPixelT ( double  value,
int  row,
int  column,
int  channel 
) [protected]

Internal template function to handle any image datatype. Sets a pixel value at a particular row, column and color channel.

Parameters:
value value to be set
row row of the image
column column of the image
channel channel of the image


Member Data Documentation

double(OpenCVImageAdapter::* OpenCVImageAdapter::getPixelfptr)(int row, int column, int channel) const [protected]

function pointer used to store getpixel function appropriate for image datatype

IplImage* OpenCVImageAdapter::mIplImage [protected]

saved pointer to OpenCV IplImage object

void(OpenCVImageAdapter::* OpenCVImageAdapter::setPixelfptr)(double value, int row, int column, int channel) [protected]

function pointer used to store setpixel function appropriate for image datatype


The documentation for this class was generated from the following files:
Generated on Thu Feb 1 15:58:49 2007 for OpenVis3D by  doxygen 1.4.7