Computational Embodied Neuroscience Simulator  1.1
3D simulation library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes | List of all members
cens::CENSPixelMap Class Reference

Use a byte vector as a matrix. More...

#include <cens_pixelmap.h>

Public Member Functions

 CENSPixelMap ()
 
 CENSPixelMap (const CENSPixelMap &copy)
 
CENSPixelMapoperator= (const CENSPixelMap &copy)
 
 CENSPixelMap (std::string imgfile)
 
 ~CENSPixelMap ()
 
GLubyte operator() (int row, int col, int channel)
 
void setData (Blob &data, int width, int height)
 
void setData (GLubyte *pixels, int width, int height)
 
const GLubyte * getData () const
 
Blob & getBlob ()
 
int getWidth () const
 
int getHeight () const
 

Private Attributes

Blob m_pxData
 
int m_pxWidth
 
int m_pxHeight
 
bool isLoaded
 

Detailed Description

Use a byte vector as a matrix.

Encapsulates a byte vector so that it can be managed as a matrix given width and height. For instance a 800x600 image stored as a 480000 bytes vector can be used as a [800,600] matrix.

Definition at line 40 of file cens_pixelmap.h.

Constructor & Destructor Documentation

cens::CENSPixelMap::CENSPixelMap ( )
inline

Definition at line 43 of file cens_pixelmap.h.

cens::CENSPixelMap::CENSPixelMap ( const CENSPixelMap copy)
inline

Definition at line 45 of file cens_pixelmap.h.

References isLoaded, m_pxData, m_pxHeight, and m_pxWidth.

cens::CENSPixelMap::CENSPixelMap ( std::string  imgfile)
inline

Definition at line 64 of file cens_pixelmap.h.

cens::CENSPixelMap::~CENSPixelMap ( )
inline

Definition at line 75 of file cens_pixelmap.h.

Member Function Documentation

Blob& cens::CENSPixelMap::getBlob ( )
inline
const GLubyte* cens::CENSPixelMap::getData ( ) const
inline
int cens::CENSPixelMap::getHeight ( ) const
inline
int cens::CENSPixelMap::getWidth ( ) const
inline
GLubyte cens::CENSPixelMap::operator() ( int  row,
int  col,
int  channel 
)
inline

Definition at line 78 of file cens_pixelmap.h.

CENSPixelMap& cens::CENSPixelMap::operator= ( const CENSPixelMap copy)
inline

Definition at line 54 of file cens_pixelmap.h.

References isLoaded, m_pxData, m_pxHeight, and m_pxWidth.

void cens::CENSPixelMap::setData ( Blob &  data,
int  width,
int  height 
)
inline

Definition at line 82 of file cens_pixelmap.h.

void cens::CENSPixelMap::setData ( GLubyte *  pixels,
int  width,
int  height 
)
inline

Definition at line 89 of file cens_pixelmap.h.

Member Data Documentation

bool cens::CENSPixelMap::isLoaded
private

Definition at line 112 of file cens_pixelmap.h.

Referenced by CENSPixelMap(), and operator=().

Blob cens::CENSPixelMap::m_pxData
private

Definition at line 109 of file cens_pixelmap.h.

Referenced by CENSPixelMap(), and operator=().

int cens::CENSPixelMap::m_pxHeight
private

Definition at line 111 of file cens_pixelmap.h.

Referenced by CENSPixelMap(), and operator=().

int cens::CENSPixelMap::m_pxWidth
private

Definition at line 110 of file cens_pixelmap.h.

Referenced by CENSPixelMap(), and operator=().


The documentation for this class was generated from the following file: