aimsdata 6.0.0
Neuroimaging data handling
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.
 
 const_iterator (const const_iterator &other)
 Copy constructor from a const_iterator.
 
 const_iterator (const iterator &other)
 Copy constructor from an iterator.
 
const_iteratoroperator= (const const_iterator &other)
 assignment from const_iterator
 
const_iteratoroperator= (const iterator &other)
 assignment from iterator
 
const_iteratoroperator++ ()
 increment (prefix)
 
const_iterator operator++ (int)
 increment (suffix)
 
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.
 
carto::VolumeRef< T > volume ()
 Returns a reference to the linked volume.
 

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.
 
 const_iterator (BorderIterator< T > &b, const Point4dl &current)
 Utility constructor: returns the iterator at position current.
 
bool isBorder (const Point4dl &p) const
 returns true if the p is in the border described by _border
 
bool isNonBorderImage (const Point4dl &p) const
 returns true if p is in the image but not in the border.
 
Point4dl reset (const Point4dl &p, const Point4dl &move) const
 Sets the coordinate (in the dimension described by move) at its most inferior (i.e.
 
Point4dl nextMove (const Point4dl &move) const
 Computes the next move.
 
Point4dl computeNext (const Point4dl &p) const
 computeNext(p) returns the next point in the border.
 
Point4dl end () const
 Point value for the "end" iterator (which points to no voxel).
 
long jumpX () const
 Gives the size of the non-border volume in the X dimension.
 

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 125 of file borderiterator.h.

Constructor & Destructor Documentation

◆ const_iterator() [1/5]

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 263 of file borderiterator.h.

References _border, and _current.

Referenced by const_iterator(), aims::BorderIterator< T >::iterator::iterator(), aims::BorderIterator< T >::iterator::iterator(), aims::BorderIterator< T >::iterator::iterator(), operator!=(), operator=(), operator=(), and operator==().

◆ const_iterator() [2/5]

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

Copy constructor from a const_iterator.

References const_iterator().

◆ const_iterator() [3/5]

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

Copy constructor from an iterator.

References aims::BorderIterator< T >::BorderIterator(), end(), and iterator.

◆ const_iterator() [4/5]

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 269 of file borderiterator.h.

References _border, _current, aims::BorderIterator< T >::BorderIterator(), and end().

◆ const_iterator() [5/5]

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 283 of file borderiterator.h.

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

Member Function Documentation

◆ computeNext()

template<typename T>
Point4dl aims::BorderIterator< T >::const_iterator::computeNext ( const Point4dl & p) const
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 493 of file borderiterator.h.

References aims::BorderIterator< T >::end(), isBorder(), isNonBorderImage(), jumpX(), nextMove(), and reset().

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

◆ coordinate()

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 163 of file borderiterator.h.

References _current.

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

◆ end()

template<typename T>
Point4dl aims::BorderIterator< T >::const_iterator::end ( ) const
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 358 of file borderiterator.h.

References std::numeric_limits< typename _Tp >::max().

Referenced by const_iterator(), const_iterator(), aims::BorderIterator< T >::iterator::iterator(), and aims::BorderIterator< T >::iterator::iterator().

◆ isBorder()

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

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

Definition at line 376 of file borderiterator.h.

References _border.

Referenced by computeNext().

◆ isNonBorderImage()

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

returns true if p is in the image but not in the border.

Definition at line 425 of file borderiterator.h.

References _border.

Referenced by computeNext().

◆ jumpX()

template<typename T>
long aims::BorderIterator< T >::const_iterator::jumpX ( ) const
protected

Gives the size of the non-border volume in the X dimension.

It is used to jump the non border volume when iterating on voxels.

Definition at line 367 of file borderiterator.h.

References _border.

Referenced by computeNext().

◆ nextMove()

template<typename T>
Point4dl aims::BorderIterator< T >::const_iterator::nextMove ( const Point4dl & move) const
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 476 of file borderiterator.h.

Referenced by computeNext().

◆ operator!=() [1/2]

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

Definition at line 346 of file borderiterator.h.

References const_iterator().

◆ operator!=() [2/2]

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

Definition at line 352 of file borderiterator.h.

References iterator.

◆ operator*()

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

Definition at line 322 of file borderiterator.h.

References _border, and _current.

◆ operator++() [1/2]

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

increment (prefix)

Definition at line 521 of file borderiterator.h.

References _current, and computeNext().

◆ operator++() [2/2]

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

increment (suffix)

Definition at line 528 of file borderiterator.h.

References _current, and computeNext().

◆ operator->()

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

Definition at line 328 of file borderiterator.h.

References _border, and _current.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

assignment from iterator

References const_iterator(), and iterator.

◆ operator==() [1/2]

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

Definition at line 334 of file borderiterator.h.

References _border, _current, and const_iterator().

◆ operator==() [2/2]

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

Definition at line 340 of file borderiterator.h.

References _border, _current, and iterator.

◆ reset()

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

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

left) value.

Definition at line 444 of file borderiterator.h.

References _border.

Referenced by computeNext().

◆ volume()

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

Returns a reference to the linked volume.

Definition at line 165 of file borderiterator.h.

References _border.

Friends And Related Symbol Documentation

◆ BorderIterator< T >

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

Definition at line 198 of file borderiterator.h.

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

◆ iterator

template<typename T>
friend class iterator
friend

Definition at line 202 of file borderiterator.h.

References iterator.

Referenced by const_iterator(), iterator, operator!=(), operator=(), and operator==().

Member Data Documentation

◆ _border

◆ _current


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