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

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

◆ const_iterator() [2/5]

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

Copy constructor from a const_iterator.

◆ const_iterator() [3/5]

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

Copy constructor from an iterator.

◆ const_iterator() [4/5]

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

◆ const_iterator() [5/5]

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

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 >::const_iterator::end(), aims::BorderIterator< T >::const_iterator::isBorder(), aims::BorderIterator< T >::const_iterator::isNonBorderImage(), aims::BorderIterator< T >::const_iterator::jumpX(), aims::BorderIterator< T >::const_iterator::nextMove(), and aims::BorderIterator< T >::const_iterator::reset().

Referenced by aims::BorderIterator< T >::const_iterator::const_iterator(), aims::BorderIterator< T >::const_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 aims::BorderIterator< T >::const_iterator::_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.

Referenced by aims::BorderIterator< T >::const_iterator::computeNext().

◆ 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 aims::BorderIterator< T >::const_iterator::_border.

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

◆ 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 aims::BorderIterator< T >::const_iterator::_border.

Referenced by aims::BorderIterator< T >::const_iterator::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 aims::BorderIterator< T >::const_iterator::_border.

Referenced by aims::BorderIterator< T >::const_iterator::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 aims::BorderIterator< T >::const_iterator::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.

◆ 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.

◆ operator*()

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

◆ operator++() [1/2]

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

◆ operator++() [2/2]

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

◆ operator->()

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

◆ 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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ 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 aims::BorderIterator< T >::const_iterator::_border.

Referenced by aims::BorderIterator< T >::const_iterator::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 aims::BorderIterator< T >::const_iterator::_border.

Friends And Related Function Documentation

◆ BorderIterator< T >

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

Definition at line 201 of file borderiterator.h.

◆ iterator

template<typename T>
friend class iterator
friend

Member Data Documentation

◆ _border

◆ _current


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