#include <iter3d.hh>
Inheritance diagram for oln::abstract::iter3d< Exact >:
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 | |
static 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). | |
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 > |
Allow iterable object (like image, window, ...) of 3 dimensions traversing.
Definition at line 70 of file iter3d.hh.
oln::abstract::iter3d< Exact >::iter3d | ( | const image3d_size & | size | ) | [inline, protected] |
Construct an iterator (3d) on an image (3d).
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 } };
coord oln::abstract::iter3d< Exact >::slice | ( | ) | const [inline] |
coord oln::abstract::iter3d< Exact >::row | ( | ) | const [inline] |
coord oln::abstract::iter3d< Exact >::col | ( | ) | const [inline] |
point3d oln::abstract::iter3d< Exact >::to_point | ( | ) | const [inline, protected] |
Get the current point viewed by the iterator.
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 }