A.I.M.S


aims::BorderIterator< T >::const_iterator Class Reference

Border: const iterator. More...

#include <aims/border/borderiterator.h>

Inheritance diagram for aims::BorderIterator< T >::const_iterator:
Collaboration diagram for aims::BorderIterator< T >::const_iterator:

Public Member Functions

 const_iterator ()
 Default constructor Create a non initialized iterator than cannot be incremented or accessed. More...
 
 const_iterator (const const_iterator &other)
 Copy constructor from a const_iterator. More...
 
 const_iterator (const iterator &other)
 Copy constructor from an iterator. More...
 
const_iteratoroperator= (const const_iterator &other)
 assignment from const_iterator More...
 
const_iteratoroperator= (const iterator &other)
 assignment from iterator More...
 
const_iteratoroperator++ ()
 increment (prefix) More...
 
const_iterator operator++ (int)
 increment (suffix) More...
 
const T & operator* () const
 
const T * operator-> () const
 
bool operator== (const const_iterator &other) const
 
bool operator== (const iterator &other) const
 
bool operator!= (const const_iterator &other) const
 
bool operator!= (const iterator &other) const
 
Point4dl coordinate () const
 Returns the coordinates of the current point in the linked volume. More...
 
carto::VolumeRef< T > volume ()
 Returns a reference to the linked volume. More...
 

Protected Member Functions

 const_iterator (BorderIterator< T > &b, bool end=false)
 Utility constructor: returns the iterator at position begin() if end is false, and end() if end is false. More...
 
 const_iterator (BorderIterator< T > &b, const Point4dl &current)
 Utility constructor: returns the iterator at position current. More...
 
bool isBorder (const Point4dl &p)
 returns true if the p is in the border described by _border More...
 
bool isInferiorBorder (const Point4dl &p, const Point4dl &move)
 returns true if p is in the inferior (i.e. More...
 
Point4dl reset (const Point4dl &p, const Point4dl &move)
 Sets the coordinate (in the dimension described by move) at its most inferior (i.e. More...
 
Point4dl nextMove (const Point4dl &move)
 Computes the next move. More...
 
Point4dl computeNext (const Point4dl &p, const Point4dl &move=Point4dl(1, 0, 0, 0))
 computeNext(p) returns the next point in the border. More...
 
Point4dl end ()
 Point value for the "end" iterator (which points to no voxel). More...
 

Protected Attributes

BorderIterator< T > _border
 
Point4dl _current
 

Friends

class BorderIterator< T >
 
class iterator
 

Detailed Description

template<typename T>
class aims::BorderIterator< T >::const_iterator

Border: const iterator.

Definition at line 129 of file borderiterator.h.

Constructor & Destructor Documentation

template<typename T >
aims::BorderIterator< T >::const_iterator::const_iterator ( )

Default constructor Create a non initialized iterator than cannot be incremented or accessed.

Definition at line 308 of file borderiterator.h.

template<typename T>
aims::BorderIterator< T >::const_iterator::const_iterator ( const const_iterator other)

Copy constructor from a const_iterator.

template<typename T>
aims::BorderIterator< T >::const_iterator::const_iterator ( const iterator other)

Copy constructor from an iterator.

template<typename T >
aims::BorderIterator< T >::const_iterator::const_iterator ( BorderIterator< T > &  b,
bool  end = false 
)
protected

Utility constructor: returns the iterator at position begin() if end is false, and end() if end is false.

Definition at line 314 of file borderiterator.h.

References aims::BorderIterator< T >::const_iterator::_border, and aims::BorderIterator< T >::const_iterator::_current.

template<typename T >
aims::BorderIterator< T >::const_iterator::const_iterator ( BorderIterator< T > &  b,
const Point4dl current 
)
protected

Utility constructor: returns the iterator at position current.

Definition at line 326 of file borderiterator.h.

Member Function Documentation

template<typename T >
Point4dl aims::BorderIterator< T >::const_iterator::computeNext ( const Point4dl p,
const Point4dl move = Point4dl(1,0,0,0) 
)
protected

computeNext(p) returns the next point in the border.

Parameters
pprevious position
movedirection in which to seek the next point. The method is always called with move 's default value from the outside, but calls iteself recursively with other values.

Definition at line 540 of file borderiterator.h.

References aims::BorderIterator< T >::end().

Referenced by aims::BorderIterator< T >::iterator::operator++().

template<typename T>
Point4dl aims::BorderIterator< T >::const_iterator::coordinate ( ) const
inline

Returns the coordinates of the current point in the linked volume.

Definition at line 167 of file borderiterator.h.

References aims::BorderIterator< T >::const_iterator::_current.

Referenced by aims::BorderFiller< T >::fillMirror(), and aims::BorderFiller< T >::fillNearest().

template<typename T >
Point4dl aims::BorderIterator< T >::const_iterator::end ( )
protected

Point value for the "end" iterator (which points to no voxel).

In this implemention, its value is (MAX_LONG,MAX_LONG,MAX_LONG,MAX_LONG)

Definition at line 401 of file borderiterator.h.

template<typename T >
bool aims::BorderIterator< T >::const_iterator::isBorder ( const Point4dl p)
protected

returns true if the p is in the border described by _border

Definition at line 410 of file borderiterator.h.

template<typename T >
bool aims::BorderIterator< T >::const_iterator::isInferiorBorder ( const Point4dl p,
const Point4dl move 
)
protected

returns true if p is in the inferior (i.e.

left) border regarding the dmension move

Parameters
pstudied point
movepoint with value 1 in one dimension and 0 in the others

Definition at line 459 of file borderiterator.h.

template<typename T >
Point4dl aims::BorderIterator< T >::const_iterator::nextMove ( const Point4dl move)
protected

Computes the next move.

If move was in the X dimension (move == (1,0,0,0)) the next move is in the Y dimension, and so on. If move was in the T dimension, nextMove() returns (0,0,0,0).

Definition at line 523 of file borderiterator.h.

template<typename T >
bool aims::BorderIterator< T >::const_iterator::operator!= ( const const_iterator other) const

Definition at line 389 of file borderiterator.h.

template<typename T >
bool aims::BorderIterator< T >::const_iterator::operator!= ( const iterator other) const

Definition at line 395 of file borderiterator.h.

template<typename T >
const T & aims::BorderIterator< T >::const_iterator::operator* ( ) const

Definition at line 365 of file borderiterator.h.

template<typename T >
BorderIterator< T >::const_iterator & aims::BorderIterator< T >::const_iterator::operator++ ( )

increment (prefix)

Definition at line 565 of file borderiterator.h.

template<typename T >
BorderIterator< T >::const_iterator aims::BorderIterator< T >::const_iterator::operator++ ( int  )

increment (suffix)

Definition at line 572 of file borderiterator.h.

template<typename T >
const T * aims::BorderIterator< T >::const_iterator::operator-> ( ) const

Definition at line 371 of file borderiterator.h.

template<typename T>
const_iterator& aims::BorderIterator< T >::const_iterator::operator= ( const const_iterator other)
template<typename T>
const_iterator& aims::BorderIterator< T >::const_iterator::operator= ( const iterator other)

assignment from iterator

template<typename T >
bool aims::BorderIterator< T >::const_iterator::operator== ( const const_iterator other) const
template<typename T >
bool aims::BorderIterator< T >::const_iterator::operator== ( const iterator other) const
template<typename T >
Point4dl aims::BorderIterator< T >::const_iterator::reset ( const Point4dl p,
const Point4dl move 
)
protected

Sets the coordinate (in the dimension described by move) at its most inferior (i.e.

left) value.

Definition at line 491 of file borderiterator.h.

template<typename T>
carto::VolumeRef<T> aims::BorderIterator< T >::const_iterator::volume ( )
inline

Returns a reference to the linked volume.

Definition at line 169 of file borderiterator.h.

References aims::BorderIterator< T >::const_iterator::_border.

Friends And Related Function Documentation

template<typename T>
friend class BorderIterator< T >
friend

Definition at line 207 of file borderiterator.h.

template<typename T>
friend class iterator
friend

Definition at line 208 of file borderiterator.h.

Member Data Documentation


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