OvImageAdapter Class Reference

Abstract Base Class for creating interfaces to import unknown image formats. More...

#include <OvImageAdapter.h>

Inheritance diagram for OvImageAdapter:

MatlabImageAdapter OpenCVImageAdapter List of all members.

Public Types

 OV_DATA_UNKNOWN
 OV_DATA_UINT8
 OV_DATA_INT8
 OV_DATA_UINT16
 OV_DATA_INT16
 OV_DATA_UINT32
 OV_DATA_INT32
 OV_DATA_UINT64
 OV_DATA_INT64
 OV_DATA_FLOAT32
 OV_DATA_DOUBLE64
enum  OvDataType {
  OV_DATA_UNKNOWN, OV_DATA_UINT8, OV_DATA_INT8, OV_DATA_UINT16,
  OV_DATA_INT16, OV_DATA_UINT32, OV_DATA_INT32, OV_DATA_UINT64,
  OV_DATA_INT64, OV_DATA_FLOAT32, OV_DATA_DOUBLE64
}

Public Member Functions

 OvImageAdapter ()
virtual ~OvImageAdapter ()
virtual void getSize (int &height, int &width, int &nColorChannels) const
virtual void getDataType (OvImageAdapter::OvDataType &dataType) const
virtual double getPixel (int row, int column, int channel) const =0
virtual void setPixel (double value, int row, int column, int channel)=0

Protected Attributes

int mHeight
int mWidth
int mChannels
OvDataType mDataType

Detailed Description

Abstract Base Class for creating interfaces to import unknown image formats.

The OvImageAdapter base class defines a very basic interface to an image which provides access to the dimensions and datatype of the image, and provides get and set methods to alter image pixels. A class derived from OvImageAdapter must implement the pixel get/set and information methods. Using OvImageAdapter objects, the library allows the user to interface with any image model. See the OpenCVImageAdapter or MatlabImageAdapter subclasses for interfacing examples.

See also:
OpenCVImageAdapter

MatlabImageAdapter

Author:
Abhijit Ogale


Member Enumeration Documentation

enum OvImageAdapter::OvDataType

Enumeration of allowed data types.

See also:
mDataType
Enumerator:
OV_DATA_UNKNOWN  unknown
OV_DATA_UINT8  unsigned char
OV_DATA_INT8  char
OV_DATA_UINT16  short
OV_DATA_INT16  unsigned short
OV_DATA_UINT32  int
OV_DATA_INT32  unsigned int
OV_DATA_UINT64  unsigned long long
OV_DATA_INT64  long long
OV_DATA_FLOAT32  float
OV_DATA_DOUBLE64  double


Constructor & Destructor Documentation

OvImageAdapter::OvImageAdapter (  ) 

Default constructor with no parameters

OvImageAdapter::~OvImageAdapter (  )  [virtual]

Destructor


Member Function Documentation

void OvImageAdapter::getDataType ( OvImageAdapter::OvDataType dataType  )  const [virtual]

Returns data type of image.

Parameters:
dataType data type of image (from enum OvDataType)
See also:
OvDataType

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

Returns a pixel value at a particular row, column and color channel. This is a pure virtual function.

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

Implemented in MatlabImageAdapter, and OpenCVImageAdapter.

void OvImageAdapter::getSize ( int &  height,
int &  width,
int &  nColorChannels 
) const [virtual]

Returns height, width and number of color channels of image.

Parameters:
height height of image
width width of image
nColorChannels number of color channels of image

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

Sets a pixel value at a particular row, column and color channel. This is a pure virtual function.

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

Implemented in MatlabImageAdapter, and OpenCVImageAdapter.


Member Data Documentation

int OvImageAdapter::mChannels [protected]

number of color channels (e.g., 1 for grayscale, 3 for RGB)

OvDataType OvImageAdapter::mDataType [protected]

Data format of a pixel channel

See also:
OvDataType

int OvImageAdapter::mHeight [protected]

height of the image

int OvImageAdapter::mWidth [protected]

width of the image


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