MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Attributes
mds::math::CMatrixIterator< M, T > Class Template Reference

Iterator used to traverse matrix elements by rows. More...

#include <mdsMatrixIterator.h>

Inheritance diagram for mds::math::CMatrixIterator< M, T >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { TEMPLATE_PARAMETER_IS_NOT_MATRIX = M::CLASS_MATRIX }
 Check that M is a matrix. More...
typedef CMatrixIterator< M, T > tDerived
 Iterator type.
typedef T tElement
 Element type.
typedef CIteratorTraits
< CMatrixIterator< M, T >
>::tItem 
tItem
 Value (or item) type.
typedef M tMatrix
 Matrix type.

Public Member Functions

void advance ()
 Moves iterator to the next element.
bool atEnd () const
 Returns true if the iterator points after the end.
 CMatrixIterator (tMatrix &Matrix)
 Constructor.
tSize col () const
tDerivedgetImpl ()
 Returns reference to the iterator implementation.
const tDerivedgetImpl () const
tSize getSize () const
 Returns size of the volume in voxels.
 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.
tSize row () const
 Returns current iterator position.
const tElementvalue () const
 Returns the current item.
tElementvaluePtr () const
 Returns pointer to the current item.
tElementvalueRef () const
 Returns reference to the current item.
 ~CMatrixIterator ()
 Destructor.

Protected Attributes

tSize m_Col
tMatrixm_Matrix
 Reference to the matrix.
tSize m_Row
 Iterator position.

Detailed Description

template<class M, typename T>
class mds::math::CMatrixIterator< M, T >

Iterator used to traverse matrix elements by rows.


Member Typedef Documentation

typedef CMatrixIterator< M, T > mds::base::CIteratorBase< CMatrixIterator< M, T > >::tDerived [inherited]

Iterator type.

template<class M , typename T >
typedef T mds::math::CMatrixIterator< M, T >::tElement

Element type.

Value (or item) type.

template<class M , typename T >
typedef M mds::math::CMatrixIterator< M, T >::tMatrix

Matrix type.


Member Enumeration Documentation

template<class M , typename T >
anonymous enum

Check that M is a matrix.

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

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_MATRIX 

Constructor & Destructor Documentation

template<class M , typename T >
mds::math::CMatrixIterator< M, T >::CMatrixIterator ( tMatrix Matrix)

Constructor.

template<class M , typename T >
mds::math::CMatrixIterator< M, T >::~CMatrixIterator ( )

Destructor.


Member Function Documentation

template<class M , typename T >
void mds::math::CMatrixIterator< M, T >::advance ( )

Moves iterator to the next element.

template<class M , typename T >
bool mds::math::CMatrixIterator< M, T >::atEnd ( ) const

Returns true if the iterator points after the end.

template<class M , typename T >
tSize mds::math::CMatrixIterator< M, T >::col ( ) const

Returns reference to the iterator implementation.

const tDerived& mds::base::CIteratorBase< CMatrixIterator< M, T > >::getImpl ( ) const [inherited]
template<class M , typename T >
tSize mds::math::CMatrixIterator< M, T >::getSize ( ) const

Returns size of the volume in voxels.

Reimplemented from mds::base::CIteratorBase< CMatrixIterator< M, T > >.

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

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

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

Returns reference to the current item.

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

Returns pointer to the current item.

template<class M , typename T >
tSize mds::math::CMatrixIterator< M, T >::row ( ) const

Returns current iterator position.

template<class M , typename T >
const tElement& mds::math::CMatrixIterator< M, T >::value ( ) const

Returns the current item.

Reimplemented from mds::base::CIteratorBase< CMatrixIterator< M, T > >.

template<class M , typename T >
tElement* mds::math::CMatrixIterator< M, T >::valuePtr ( ) const

Returns pointer to the current item.

Reimplemented from mds::base::CIteratorBase< CMatrixIterator< M, T > >.

template<class M , typename T >
tElement& mds::math::CMatrixIterator< M, T >::valueRef ( ) const

Returns reference to the current item.

Reimplemented from mds::base::CIteratorBase< CMatrixIterator< M, T > >.


Member Data Documentation

template<class M , typename T >
tSize mds::math::CMatrixIterator< M, T >::m_Col [protected]
template<class M , typename T >
tMatrix& mds::math::CMatrixIterator< M, T >::m_Matrix [protected]

Reference to the matrix.

template<class M , typename T >
tSize mds::math::CMatrixIterator< M, T >::m_Row [protected]

Iterator position.


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