#include <MatlabImageAdapter.h>
Inheritance diagram for MatlabImageAdapter:

Public Member Functions | |
| MatlabImageAdapter (mxArray *im) | |
| virtual | ~MatlabImageAdapter () |
| 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<class T> | |
| double | getPixelT (int row, int column, int channel) const |
| template<class 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 | |
| mxArray * | mMatlabImage |
| void * | mImageDataPtr |
| double(MatlabImageAdapter::* | getPixelfptr )(int row, int column, int channel) const |
| void(MatlabImageAdapter::* | setPixelfptr )(double value, int row, int column, int channel) |
The MatlabImageAdapter class is inherited from the OvImageAdapter and provides a wrapper around Matlab's mxArray allowing the OpenVis3D library functions to access the dimensions and datatype of the image, and provides get and set methods to alter image pixels.
| MatlabImageAdapter::MatlabImageAdapter | ( | mxArray * | im | ) |
to prevent the default constructor from being used
| MatlabImageAdapter::~MatlabImageAdapter | ( | ) | [virtual] |
Destructor.
| double MatlabImageAdapter::getPixel | ( | int | row, | |
| int | column, | |||
| int | channel | |||
| ) | const [virtual] |
Returns a pixel value at a particular row, column and color channel.
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
Implements OvImageAdapter.
| double MatlabImageAdapter::getPixeldoNothing | ( | int | row, | |
| int | column, | |||
| int | channel | |||
| ) | const [protected] |
Dummy function for use when internal mxArray pointer is null or data type unknown.
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
| double MatlabImageAdapter::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.
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
| void MatlabImageAdapter::setPixel | ( | double | value, | |
| int | row, | |||
| int | column, | |||
| int | channel | |||
| ) | [virtual] |
Sets a pixel value at a particular row, column and color channel.
| value | value to be set | |
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
Implements OvImageAdapter.
| void MatlabImageAdapter::setPixeldoNothing | ( | double | value, | |
| int | row, | |||
| int | column, | |||
| int | channel | |||
| ) | [protected] |
Dummy function for use when internal mxArray pointer is null or data type unknown.
| value | value to be set | |
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
| void MatlabImageAdapter::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.
| value | value to be set | |
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
double(MatlabImageAdapter::* MatlabImageAdapter::getPixelfptr)(int row, int column, int channel) const [protected] |
function pointer used to store getpixel function appropriate for image datatype
void* MatlabImageAdapter::mImageDataPtr [protected] |
saved pointer to the raw data array within the Matlab mxArray object
mxArray* MatlabImageAdapter::mMatlabImage [protected] |
saved pointer to Matlab mxArray object
void(MatlabImageAdapter::* MatlabImageAdapter::setPixelfptr)(double value, int row, int column, int channel) [protected] |
function pointer used to store setpixel function appropriate for image datatype
1.4.7