a 3D iterator that knows its position in the 3D grid ans supports iterating over sub-ranges More...
#include <mia/3d/iterator.hh>
Public Types | |
enum | EBoundary { eb_none = 0, eb_xlow = 1, eb_xhigh = 2, eb_x = 3, eb_ylow = 4, eb_yhigh = 8, eb_y = 0xC, eb_zlow = 0x10, eb_zhigh = 0x20, eb_z = 0x30 } |
typedef I | internal_iterator |
data type for the real iterator in the background More... | |
typedef I::pointer | pointer |
data type pointer More... | |
typedef I::reference | reference |
data type reference More... | |
Public Member Functions | |
int | get_boundary_flags () const |
internal_iterator | get_point () |
reference | operator* () const |
range3d_iterator< I > & | operator++ () |
prefix increment More... | |
range3d_iterator< I > | operator++ (int) |
postfix increment More... | |
pointer | operator-> () const |
range3d_iterator< I > & | operator= (const range3d_iterator< I > &other) |
assignment operator More... | |
template<typename AI > | |
range3d_iterator< I > & | operator= (const range3d_iterator< AI > &other) |
const C3DBounds & | pos () const |
range3d_iterator () | |
range3d_iterator (const C3DBounds &pos, const C3DBounds &size, const C3DBounds &start, const C3DBounds &end, I iterator) | |
range3d_iterator (const C3DBounds &pos) | |
range3d_iterator (const range3d_iterator< I > &other) | |
copy constructore More... | |
template<typename AI > | |
range3d_iterator (const range3d_iterator< AI > &other) | |
Friends | |
template<typename AI > | |
class | range3d_iterator |
friend iterator type because we may want to copy a iterator to a const_iterator. More... | |
a 3D iterator that knows its position in the 3D grid ans supports iterating over sub-ranges
Iterator to iterate over a sub-range of 3D data that is given on a grid. Two iterators are considered to be equal, if their positions are equal.
the | internal iterator that is used to iterate of the original grid without skipping. |
Definition at line 42 of file 3d/iterator.hh.
typedef I range3d_iterator< I >::internal_iterator |
data type for the real iterator in the background
Definition at line 49 of file 3d/iterator.hh.
typedef I::pointer range3d_iterator< I >::pointer |
data type pointer
Definition at line 47 of file 3d/iterator.hh.
typedef I::reference range3d_iterator< I >::reference |
data type reference
Definition at line 45 of file 3d/iterator.hh.
enum range3d_iterator::EBoundary |
Enumerate to describe the various positions on the domain boundarys. These boundaries correspond to the full domain of the data, not to the sub-range this iteratior works on. I.e. if the sub-range is a subset of the open domain (i.e. without its boundary) then the iterator will never touch the domain boundary.
Definition at line 58 of file 3d/iterator.hh.
range3d_iterator< I >::range3d_iterator | ( | ) |
standard constructor
range3d_iterator< I >::range3d_iterator | ( | const C3DBounds & | pos, |
const C3DBounds & | size, | ||
const C3DBounds & | start, | ||
const C3DBounds & | end, | ||
I | iterator | ||
) |
Full constructor of the range iterator
pos | iterator position to initialize the iterator with |
size | size of the original data field |
start | start of the iterator range |
end | end of the iterator range |
iterator | the iterator of the underlying 3D data structure |
range3d_iterator< I >::range3d_iterator | ( | const C3DBounds & | pos) |
End iterator, can't be dereferenced This iterator is only there to define the end position of the range_iterator.
pos | end position to set this iterator to. |
range3d_iterator< I >::range3d_iterator | ( | const range3d_iterator< I > & | other) |
copy constructore
range3d_iterator< I >::range3d_iterator | ( | const range3d_iterator< AI > & | other) |
Constructor to construct the iterator from one that is based on another iterator type. The usual idea is that a iterator may be converted into it's const variant.
AI | the other iterator type. Iterator type I must be copy-constructable from type AI |
other |
Definition at line 187 of file 3d/iterator.hh.
int range3d_iterator< I >::get_boundary_flags | ( | ) | const |
internal_iterator range3d_iterator< I >::get_point | ( | ) |
Return the internal iterator
reference range3d_iterator< I >::operator* | ( | ) | const |
range3d_iterator<I>& range3d_iterator< I >::operator++ | ( | ) |
prefix increment
range3d_iterator<I> range3d_iterator< I >::operator++ | ( | int | ) |
postfix increment
pointer range3d_iterator< I >::operator-> | ( | ) | const |
range3d_iterator<I>& range3d_iterator< I >::operator= | ( | const range3d_iterator< I > & | other) |
assignment operator
range3d_iterator< I > & range3d_iterator< I >::operator= | ( | const range3d_iterator< AI > & | other) |
Assignment operator from another type of iterator
AI | other iterator type. The assignment I b = a; with a of type AI must be defined. |
other |
Definition at line 172 of file 3d/iterator.hh.
const C3DBounds& range3d_iterator< I >::pos | ( | ) | const |
Referenced by kmeans().
friend iterator type because we may want to copy a iterator to a const_iterator.
Definition at line 102 of file 3d/iterator.hh.