MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
mds::img::CPyramid< I > Class Template Reference

Template providing pyramidal image representation. More...

#include <mdsPyramid.h>

Inheritance diagram for mds::img::CPyramid< I >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { TEMPLATE_PARAMETER_IS_NOT_IMAGE = I::CLASS_IMAGE }
 Check that I is an image. More...
enum  { CLASS_OBJECT }
 Templates that require members of the CObject class can use this enum to check the existence. More...
enum  { HEAP_OBJECT = 0x70616568 }
 Signature used to recognize objects on the heap. More...
typedef I::tImage tImage
 Image type.
typedef I::tSmartPtr tImageSmartPtr
 Smart pointer to image.
typedef I::tPixel tPixel
 Image pixel type.

Public Member Functions

 CPyramid ()
 Default constructor.
 CPyramid (tSize SubSampling, tSize Levels, const CImageBase< tImage > &Image)
 Constructor.
bool create (tSize SubSampling, tSize Levels, const CImageBase< tImage > &Image)
 Creates a new image pyramid based on a given image.
tImagegetImage (tSize Level)
 Returns reference to a specified image.
const tImagegetImage (tSize Level) const
tImagegetImagePtr (tSize Level)
 Returns pointer to a specified image.
tSize getLevels () const
 Returns the number of pyramid levels.
int getReferencesCount () const
 Returns the number of references.
tSize getSubSampling () const
 Returns pyramid subsampling rate.
tSize getXSize (tSize Level) const
 Returns the image size of a specified pyramid level.
tSize getYSize (tSize Level) const
bool isCreated () const
 Returns true if the pyramid is created.
bool isOnHeap () const
 Returns true if the object is allocated on the heap.
 MDS_SHAREDPTR (CPyramid)
 Smart pointer type.
virtual ~CPyramid ()
 Destructor.

Static Public Member Functions

static void * operator new (std::size_t Size)
 Allocates a new object on the heap.

Static Public Attributes

static const double SIGMA = 1.5
 Sigma parameter of the Gaussian filter which is used to smooth images.

Protected Member Functions

void addReference () const
 Increase the reference counter.
bool delReference () const
 Decrease the reference counter.

Protected Attributes

int m_iHeapObject
 Flag initialized if the object is on the heap.
std::vector< tImageSmartPtrm_Images
 Vector of subsampled images.
int m_iReferences
 The number of references to the object.
tSize m_Levels
 The number of pyramid levels.
CGaussFilter< tImagem_SmoothingFilter
 Gaussian filter used for smoothing images.
tSize m_SubSampling
 Pyramid sub-sampling.

Detailed Description

template<class I>
class mds::img::CPyramid< I >

Template providing pyramidal image representation.


Member Typedef Documentation

template<class I >
typedef I::tImage mds::img::CPyramid< I >::tImage

Image type.

template<class I >
typedef I::tSmartPtr mds::img::CPyramid< I >::tImageSmartPtr

Smart pointer to image.

template<class I >
typedef I::tPixel mds::img::CPyramid< I >::tPixel

Image pixel type.


Member Enumeration Documentation

template<class I >
anonymous enum

Check that I is an image.

You will see name of this enum somewhere in compiler error message if the type I is not image.

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_IMAGE 
anonymous enum [inherited]

Templates that require members of the CObject class can use this enum to check the existence.

Enumerator:
CLASS_OBJECT 
anonymous enum [inherited]

Signature used to recognize objects on the heap.

Enumerator:
HEAP_OBJECT 

Constructor & Destructor Documentation

template<class I >
mds::img::CPyramid< I >::CPyramid ( )

Default constructor.

template<class I >
CPyramid::CPyramid ( tSize  SubSampling,
tSize  Levels,
const CImageBase< tImage > &  Image 
)

Constructor.

  • Creates a new image pyramid based on a given image.
  • The original image forms the zero level of the created pyramid.
template<class I >
CPyramid::~CPyramid ( ) [virtual]

Destructor.


Member Function Documentation

void mds::base::CObject::addReference ( ) const [protected, inherited]

Increase the reference counter.

template<class I >
bool CPyramid::create ( tSize  SubSampling,
tSize  Levels,
const CImageBase< tImage > &  Image 
)

Creates a new image pyramid based on a given image.

  • The original image forms the zero level of the created pyramid.
bool mds::base::CObject::delReference ( ) const [protected, inherited]

Decrease the reference counter.

  • Returns true if the decremented number of references is lower or equal to zero and object must be deleted.
template<class I >
CPyramid< I >::tImage & CPyramid::getImage ( tSize  Level)

Returns reference to a specified image.

template<class I >
const CPyramid< I >::tImage & mds::img::CPyramid< I >::getImage ( tSize  Level) const
template<class I >
CPyramid< I >::tImage * CPyramid::getImagePtr ( tSize  Level)

Returns pointer to a specified image.

  • NULL on failure.
template<class I >
tSize mds::img::CPyramid< I >::getLevels ( ) const

Returns the number of pyramid levels.

Returns the number of references.

template<class I >
tSize mds::img::CPyramid< I >::getSubSampling ( ) const

Returns pyramid subsampling rate.

template<class I >
tSize mds::img::CPyramid< I >::getXSize ( tSize  Level) const

Returns the image size of a specified pyramid level.

template<class I >
tSize mds::img::CPyramid< I >::getYSize ( tSize  Level) const
template<class I >
bool mds::img::CPyramid< I >::isCreated ( ) const

Returns true if the pyramid is created.

bool mds::base::CObject::isOnHeap ( ) const [inherited]

Returns true if the object is allocated on the heap.

template<class I >
mds::img::CPyramid< I >::MDS_SHAREDPTR ( CPyramid< I >  )

Smart pointer type.

  • Declares type tSmartPtr.
static void* mds::base::CObject::operator new ( std::size_t  Size) [static, inherited]

Allocates a new object on the heap.


Member Data Documentation

int mds::base::CObject::m_iHeapObject [mutable, protected, inherited]

Flag initialized if the object is on the heap.

template<class I >
std::vector<tImageSmartPtr> mds::img::CPyramid< I >::m_Images [protected]

Vector of subsampled images.

int mds::base::CObject::m_iReferences [mutable, protected, inherited]

The number of references to the object.

  • Zero if there is no reference.
template<class I >
tSize mds::img::CPyramid< I >::m_Levels [protected]

The number of pyramid levels.

template<class I >
CGaussFilter<tImage> mds::img::CPyramid< I >::m_SmoothingFilter [protected]

Gaussian filter used for smoothing images.

template<class I >
tSize mds::img::CPyramid< I >::m_SubSampling [protected]

Pyramid sub-sampling.

template<class I >
const double CPyramid::SIGMA = 1.5 [static]

Sigma parameter of the Gaussian filter which is used to smooth images.


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