Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
icl::core::CvMatWrapper< T > Class Template Reference

Utility class that wraps around a CvMat of type CV_32FC1. More...

#include <OpenCV.h>

Inheritance diagram for icl::core::CvMatWrapper< T >:
icl::utils::Uncopyable

List of all members.

Public Member Functions

 CvMatWrapper (int nrows=0, int ncols=0)
 Constructor, creates a CvMat with given dimensions.
 CvMatWrapper (const utils::Size &size)
 CvMatWrapper (CvMat *other, bool takeOwnerShip=false)
 Constructor with given source matrix (wrappes around that)
CvMat * get ()
 returns the current wrapped CvMat pointer
const CvMat * get () const
 returns the current wrapped CvMat pointer (const)
void setSize (const utils::Size &size)
 adapts the size (if necessary)
bool isNull () const
 returns whether a non-null pointer is wrapped
const utils::SizegetSize () const
 returns the current size
T & operator() (int y, int x)
 index operator
const T & operator() (int y, int x) const
 index operator (const)

Private Attributes

utils::Size size
 current size
utils::SmartPtrBase< CvMat,
CvMatDelOp
m

Detailed Description

template<class T>
class icl::core::CvMatWrapper< T >

Utility class that wraps around a CvMat of type CV_32FC1.

The wrapper simply handles construction, x/y- indexing and deletion of the internally used CvMat pointer in its destructor.


Constructor & Destructor Documentation

template<class T >
icl::core::CvMatWrapper< T >::CvMatWrapper ( int  nrows = 0,
int  ncols = 0 
) [inline]

Constructor, creates a CvMat with given dimensions.

template<class T >
icl::core::CvMatWrapper< T >::CvMatWrapper ( const utils::Size size) [inline]
template<class T >
icl::core::CvMatWrapper< T >::CvMatWrapper ( CvMat *  other,
bool  takeOwnerShip = false 
) [inline]

Constructor with given source matrix (wrappes around that)

Optionally, ownership is taken!


Member Function Documentation

template<class T >
CvMat* icl::core::CvMatWrapper< T >::get ( void  ) [inline]

returns the current wrapped CvMat pointer

template<class T >
const CvMat* icl::core::CvMatWrapper< T >::get ( void  ) const [inline]

returns the current wrapped CvMat pointer (const)

template<class T >
const utils::Size& icl::core::CvMatWrapper< T >::getSize ( ) const [inline]

returns the current size

template<class T >
bool icl::core::CvMatWrapper< T >::isNull ( ) const [inline]

returns whether a non-null pointer is wrapped

template<class T >
T& icl::core::CvMatWrapper< T >::operator() ( int  y,
int  x 
) [inline]

index operator

template<class T >
const T& icl::core::CvMatWrapper< T >::operator() ( int  y,
int  x 
) const [inline]

index operator (const)

template<class T >
void icl::core::CvMatWrapper< T >::setSize ( const utils::Size size) [inline]

adapts the size (if necessary)

If the size is adapted, the newly created instace's ownership is taken over


Member Data Documentation

template<class T >
utils::SmartPtrBase<CvMat,CvMatDelOp> icl::core::CvMatWrapper< T >::m [private]
template<class T >
utils::Size icl::core::CvMatWrapper< T >::size [private]

current size


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines