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

Iterator used to traverse image pixels by lines. More...

#include <mdsImageIterator.h>

Inheritance diagram for mds::img::CImageIterator< I, T >:
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...
typedef CImageIterator< I, T > tDerived
 Iterator type.
typedef I tImage
 Image type.
typedef CIteratorTraits
< CImageIterator< I, T >
>::tItem 
tItem
 Value (or item) type.
typedef T tPixel
 Pixel type.

Public Member Functions

void advance ()
 Moves iterator to the next pixel.
bool atEnd () const
 Returns true if the iterator points at the end.
 CImageIterator (tImage &Image)
 Constructor.
tDerivedgetImpl ()
 Returns reference to the iterator implementation.
const tDerivedgetImpl () const
tSize getSize () const
 Returns size of the image in pixels.
 operator bool () const
 Returns true if the iterator is valid, i.e. not pointing after the end.
tItemoperator* () const
 Returns reference to the current item.
CIteratorBaseoperator++ ()
CIteratorBase operator++ (int)
tItemoperator-> () const
 Returns pointer to the current item.
const tPixelvalue () const
 Returns the current pixel value.
tPixelvaluePtr () const
 Returns pointer to the current pixel.
tPixelvalueRef () const
 Returns reference to the current pixel.
tSize x () const
 Returns current iterator position.
tSize y () const
 ~CImageIterator ()
 Destructor.

Protected Attributes

tImagem_Image
 Reference to the image.
tSize m_x
 Current iterator position.
tSize m_y

Detailed Description

template<class I, typename T>
class mds::img::CImageIterator< I, T >

Iterator used to traverse image pixels by lines.


Member Typedef Documentation

typedef CImageIterator< I, T > mds::base::CIteratorBase< CImageIterator< I, T > >::tDerived [inherited]

Iterator type.

template<class I , typename T >
typedef I mds::img::CImageIterator< I, T >::tImage

Image type.

Value (or item) type.

template<class I , typename T >
typedef T mds::img::CImageIterator< I, T >::tPixel

Pixel type.


Member Enumeration Documentation

template<class I , typename T >
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 

Constructor & Destructor Documentation

template<class I , typename T >
mds::img::CImageIterator< I, T >::CImageIterator ( tImage Image)

Constructor.

template<class I , typename T >
mds::img::CImageIterator< I, T >::~CImageIterator ( )

Destructor.


Member Function Documentation

template<class I , typename T >
void mds::img::CImageIterator< I, T >::advance ( )

Moves iterator to the next pixel.

template<class I , typename T >
bool mds::img::CImageIterator< I, T >::atEnd ( ) const

Returns true if the iterator points at the end.

Returns reference to the iterator implementation.

const tDerived& mds::base::CIteratorBase< CImageIterator< I, T > >::getImpl ( ) const [inherited]
template<class I , typename T >
tSize mds::img::CImageIterator< I, T >::getSize ( ) const

Returns size of the image in pixels.

Reimplemented from mds::base::CIteratorBase< CImageIterator< I, T > >.

mds::base::CIteratorBase< CImageIterator< I, T > >::operator bool ( ) const [inherited]

Returns true if the iterator is valid, i.e. not pointing after the end.

tItem& mds::base::CIteratorBase< CImageIterator< I, T > >::operator* ( ) const [inherited]

Returns reference to the current item.

CIteratorBase& mds::base::CIteratorBase< CImageIterator< I, T > >::operator++ ( ) [inherited]
CIteratorBase mds::base::CIteratorBase< CImageIterator< I, T > >::operator++ ( int  ) [inherited]
tItem* mds::base::CIteratorBase< CImageIterator< I, T > >::operator-> ( ) const [inherited]

Returns pointer to the current item.

template<class I , typename T >
const tPixel& mds::img::CImageIterator< I, T >::value ( ) const

Returns the current pixel value.

Reimplemented from mds::base::CIteratorBase< CImageIterator< I, T > >.

template<class I , typename T >
tPixel* mds::img::CImageIterator< I, T >::valuePtr ( ) const

Returns pointer to the current pixel.

Reimplemented from mds::base::CIteratorBase< CImageIterator< I, T > >.

template<class I , typename T >
tPixel& mds::img::CImageIterator< I, T >::valueRef ( ) const

Returns reference to the current pixel.

Reimplemented from mds::base::CIteratorBase< CImageIterator< I, T > >.

template<class I , typename T >
tSize mds::img::CImageIterator< I, T >::x ( ) const

Returns current iterator position.

template<class I , typename T >
tSize mds::img::CImageIterator< I, T >::y ( ) const

Member Data Documentation

template<class I , typename T >
tImage& mds::img::CImageIterator< I, T >::m_Image [protected]

Reference to the image.

template<class I , typename T >
tSize mds::img::CImageIterator< I, T >::m_x [protected]

Current iterator position.

template<class I , typename T >
tSize mds::img::CImageIterator< I, T >::m_y [protected]

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