oln::abstract::iter3d< Exact > Class Template Reference

#include <iter3d.hh>

Inheritance diagram for oln::abstract::iter3d< Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::abstract::iter3d< Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef iter< Exact > super_type
 The exact type of the object.


Public Member Functions

coord slice () const
 Get the coordinates (slice) of iterator's current point.

coord row () const
 Get the coordinates (row) of iterator's current point.

coord col () const
 Get the coordinates (col) of iterator's current point.


Static Public Member Functions

std::string name ()
 Return the name of the type.


Protected Member Functions

point3d to_point () const
 Get the current point viewed by the iterator.

 iter3d ()
 Constructor.

 iter3d (const image3d_size &size)
 Construct an iterator (3d) on an image (3d).
  • size The size of the image to iterate.



Protected Attributes

const coord nslices_
 The number of slices of the image you are iterating.

const coord nrows_
 The number of rows of the image you are iterating.

const coord ncols_
 The number of columns of the image you are iterating.


Friends

class iter< Exact >

Detailed Description

template<class Exact>
class oln::abstract::iter3d< Exact >

Iterator on image of 3 dimensions.

Allow iterable object (like image, window, ...) of 3 dimensions traversing.

See also:
iter

Definition at line 70 of file iter3d.hh.


Constructor & Destructor Documentation

template<class Exact>
oln::abstract::iter3d< Exact >::iter3d const image3d_size size  )  [inline, protected]
 

Construct an iterator (3d) on an image (3d).

  • size The size of the image to iterate.

Precondition:
size.ncols() > 0.

size.nrows() > 0.

size.nslices() > 0.

Definition at line 160 of file iter3d.hh.

00160                                        :
00161         super_type(),
00162         nslices_(size.nslices()),
00163         nrows_(size.nrows()),
00164         ncols_(size.ncols())
00165       {
00166         precondition(size.nslices() > 0
00167                      && size.nrows() > 0
00168                      && size.ncols() > 0);
00169         this->exact().goto_begin_();
00170       }
    };


Member Function Documentation

template<class Exact>
coord oln::abstract::iter3d< Exact >::col  )  const [inline]
 

Get the coordinates (col) of iterator's current point.

Returns:
The col number.
On this kind of image (i.e. 3 dimensions), you are able to get the column number, the row number and the slice number.

Definition at line 112 of file iter3d.hh.

00113       {
00114         return this->p_.col();
00115       }

template<class Exact>
coord oln::abstract::iter3d< Exact >::row  )  const [inline]
 

Get the coordinates (row) of iterator's current point.

Returns:
The row number.
On this kind of image (i.e. 3 dimensions), you are able to get the column number, the row number and the slice number.

Definition at line 99 of file iter3d.hh.

00100       {
00101         return this->p_.row();
00102       }

template<class Exact>
coord oln::abstract::iter3d< Exact >::slice  )  const [inline]
 

Get the coordinates (slice) of iterator's current point.

Returns:
The slice number.
On this kind of image (i.e. 3 dimensions), you are able to get the column number, the row number and the slice number.

Definition at line 86 of file iter3d.hh.

00087       {
00088         return this->p_.slice();
00089       }

template<class Exact>
point3d oln::abstract::iter3d< Exact >::to_point  )  const [inline, protected]
 

Get the current point viewed by the iterator.

Returns:
The point (3 dimensions) viewed by the iterator.
Precondition:
Instance != end.

Definition at line 135 of file iter3d.hh.

00136       {
00137         precondition(*this != end);
00138         invariant(this->p_.slice() >=0
00139                   && this->p_.slice() < nslices_
00140                   && this->p_.row() >= 0
00141                   && this->p_.row() < nrows_
00142                   && this->p_.col() >= 0
00143                   && this->p_.col() < ncols_);
00144         return this->p_;
00145       }


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 20:15:09 2004 for Olena by doxygen 1.3.6-20040222