MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class template providing mechanism of reference counting to IplImage data (see the OpenCV library documentation). More...
#include <mdsCvImageRef.h>
Classes | |
struct | SRefInfo |
Structure containing number of references to the image. More... | |
Public Types | |
typedef T | tData |
Image pixel type. | |
Public Member Functions | |
const IplImage * | asIpl () const |
Returns pointer to the IplImage. | |
IplImage * | asIpl () |
CvImageRef & | create (tSize Width, tSize Height) |
Allocates image data of a given size. | |
CvImageRef & | create (const CvImageRef &Data, tSize Col, tSize Row, tSize Width, tSize Height) |
Creates a subimage of a given image. | |
CvImageRef & | create (const CvImageRef &Data, tSize Col, tSize Row, tSize Width, tSize Height, EMakeRef) |
Creates a subimage of a given image. | |
CvImageRef & | create (const CvImageRef &Data) |
Allocates imade data and copies the specified one. | |
CvImageRef & | create (IplImage *pImage) |
Creates image from the IplImage directly image. | |
CvImageRef & | create (const CvImageRef &Data, EMakeRef) |
Makes a new reference to existing image data. | |
CvImageRef () | |
Default constructor allocates data of zero size. | |
CvImageRef (EEmptyConst) | |
This constructor does no allocation of the data. | |
CvImageRef & | detach () |
Decreases the number of references and deallocates the image data if neccessary. | |
int | getChannels () const |
Returns the number of channels. | |
int | getColOffset () const |
Returns offset between two neighbouring elements in a row. | |
int | getDepth () const |
Returns the image depth (see predefined OpenCV constants). | |
int | getHeight () const |
Returns IplImage height. | |
int | getNumOfReferences () const |
Returns the number of references to the data. | |
int | getPixelSize () const |
Returns pixel size in bytes. | |
T * | getPtr () |
Returns pointer to the underlying image data. | |
const T * | getPtr () const |
CvRect | getROI () const |
Returns the current ROI within the image (see OpenCV linbrary for details). | |
int | getROIHeight () const |
Returns the ROI height. | |
T * | getROIPtr () |
Returns pointer to the ROI image data. | |
const T * | getROIPtr () const |
int | getROIWidth () const |
Returns the ROI width. | |
int | getRowOffset () const |
Returns offset between two neighbouring elements in a column. | |
int | getSize () const |
Returns size of the underlying image data in pixels. | |
int | getWidth () const |
Returns IplImage image width. | |
CvImageRef & | makeROI (int Col, int Row, int Width, int Height) |
Creates ROI within the current image (see OpenCV linbrary for details). | |
CvImageRef & | resetROI () |
Clears ROI within the image (the whole image is selected). | |
~CvImageRef () | |
Destructor. | |
Protected Member Functions | |
CvImageRef (const CvImageRef &) | |
Protected copy constructor. | |
CvImageRef & | operator= (const CvImageRef &) |
Protected assignment operator. | |
Protected Attributes | |
IplImage * | m_pImage |
Pointer to the Ipl image. | |
SRefInfo * | m_pRef |
Pointer to the structure containing the number of references. |
Class template providing mechanism of reference counting to IplImage data (see the OpenCV library documentation).
typedef T mds::img::CvImageRef< T >::tData |
Image pixel type.
CvImageRef::CvImageRef | ( | ) |
Default constructor allocates data of zero size.
CvImageRef::CvImageRef | ( | EEmptyConst | ) |
This constructor does no allocation of the data.
CvImageRef::~CvImageRef | ( | ) |
Destructor.
mds::img::CvImageRef< T >::CvImageRef | ( | const CvImageRef< T > & | ) | [protected] |
Protected copy constructor.
const IplImage* mds::img::CvImageRef< T >::asIpl | ( | ) | const |
Returns pointer to the IplImage.
IplImage* mds::img::CvImageRef< T >::asIpl | ( | ) |
CvImageRef< T > & CvImageRef::create | ( | tSize | Width, |
tSize | Height | ||
) |
Allocates image data of a given size.
CvImageRef< T > & CvImageRef::create | ( | const CvImageRef< T > & | Data, |
tSize | Col, | ||
tSize | Row, | ||
tSize | Width, | ||
tSize | Height | ||
) |
Creates a subimage of a given image.
CvImageRef< T > & CvImageRef::create | ( | const CvImageRef< T > & | Data, |
tSize | Col, | ||
tSize | Row, | ||
tSize | Width, | ||
tSize | Height, | ||
EMakeRef | |||
) |
Creates a subimage of a given image.
CvImageRef& mds::img::CvImageRef< T >::create | ( | const CvImageRef< T > & | Data | ) |
Allocates imade data and copies the specified one.
CvImageRef< T > & CvImageRef::create | ( | IplImage * | pImage | ) |
Creates image from the IplImage directly image.
CvImageRef& mds::img::CvImageRef< T >::create | ( | const CvImageRef< T > & | Data, |
EMakeRef | |||
) |
Makes a new reference to existing image data.
CvImageRef< T > & CvImageRef::detach | ( | ) |
Decreases the number of references and deallocates the image data if neccessary.
int mds::img::CvImageRef< T >::getChannels | ( | ) | const |
Returns the number of channels.
int mds::img::CvImageRef< T >::getColOffset | ( | ) | const |
Returns offset between two neighbouring elements in a row.
int mds::img::CvImageRef< T >::getDepth | ( | ) | const |
Returns the image depth (see predefined OpenCV constants).
int mds::img::CvImageRef< T >::getHeight | ( | ) | const |
Returns IplImage height.
int mds::img::CvImageRef< T >::getNumOfReferences | ( | ) | const |
Returns the number of references to the data.
int mds::img::CvImageRef< T >::getPixelSize | ( | ) | const |
Returns pixel size in bytes.
T* mds::img::CvImageRef< T >::getPtr | ( | ) |
Returns pointer to the underlying image data.
const T* mds::img::CvImageRef< T >::getPtr | ( | ) | const |
CvRect mds::img::CvImageRef< T >::getROI | ( | ) | const |
Returns the current ROI within the image (see OpenCV linbrary for details).
int mds::img::CvImageRef< T >::getROIHeight | ( | ) | const |
Returns the ROI height.
T* mds::img::CvImageRef< T >::getROIPtr | ( | ) |
Returns pointer to the ROI image data.
const T* mds::img::CvImageRef< T >::getROIPtr | ( | ) | const |
int mds::img::CvImageRef< T >::getROIWidth | ( | ) | const |
Returns the ROI width.
int mds::img::CvImageRef< T >::getRowOffset | ( | ) | const |
Returns offset between two neighbouring elements in a column.
int mds::img::CvImageRef< T >::getSize | ( | ) | const |
Returns size of the underlying image data in pixels.
int mds::img::CvImageRef< T >::getWidth | ( | ) | const |
Returns IplImage image width.
CvImageRef< T > & CvImageRef::makeROI | ( | int | Col, |
int | Row, | ||
int | Width, | ||
int | Height | ||
) |
Creates ROI within the current image (see OpenCV linbrary for details).
CvImageRef& mds::img::CvImageRef< T >::operator= | ( | const CvImageRef< T > & | ) | [protected] |
Protected assignment operator.
CvImageRef< T > & CvImageRef::resetROI | ( | ) |
Clears ROI within the image (the whole image is selected).
IplImage* mds::img::CvImageRef< T >::m_pImage [protected] |
Pointer to the Ipl image.
SRefInfo* mds::img::CvImageRef< T >::m_pRef [protected] |
Pointer to the structure containing the number of references.