Image Component Library (ICL)
Public Member Functions | Private Attributes | List of all members
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

Public Member Functions

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

Private Attributes

utils::Size size
 current size More...
 
utils::SmartPtrBase< CvMat, CvMatDelOpm
 

Additional Inherited Members

- Protected Member Functions inherited from icl::utils::Uncopyable
 Uncopyable ()
 Empty base constructor. More...
 

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

◆ CvMatWrapper() [1/3]

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

Constructor, creates a CvMat with given dimensions.

◆ CvMatWrapper() [2/3]

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

◆ CvMatWrapper() [3/3]

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

◆ get() [1/2]

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

returns the current wrapped CvMat pointer

◆ get() [2/2]

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

returns the current wrapped CvMat pointer (const)

◆ getSize()

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

returns the current size

◆ isNull()

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

returns whether a non-null pointer is wrapped

◆ operator()() [1/2]

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

index operator

◆ operator()() [2/2]

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

index operator (const)

◆ operator=()

template<class T>
void icl::core::CvMatWrapper< T >::operator= ( const Img< T > &  image)
inline

assigns given image (channel 0 only)

◆ setSize()

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

◆ m

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

◆ size

template<class T>
utils::Size icl::core::CvMatWrapper< T >::size
private

current size


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