Public Member Functions | Private Attributes

DGtal::FreemanChain::constIterator Class Reference

#include <FreemanChain.h>

Collaboration diagram for DGtal::FreemanChain::constIterator:
Collaboration graph
[legend]

Public Member Functions

 constIterator ()
 constIterator (const FreemanChain &aChain, unsigned int n=0)
 constIterator (const constIterator &aOther)
constIteratoroperator= (const constIterator &aOther)
 ~constIterator ()
PointI2D operator* () const
PointI2D get () const
constIteratoroperator++ ()
void next ()
void nextInLoop ()
unsigned int getPosition () const
const FreemanChaingetChain () const
unsigned int getCode () const
constIteratoroperator-- ()
void previous ()
void previousInLoop ()
bool operator== (const constIterator &aOther) const
bool operator!= (const constIterator &aOther) const
bool operator< (const constIterator &aOther) const

Private Attributes

const FreemanChainmyFc
unsigned int myPos
PointI2D myXY

Detailed Description

This class represents an iterator on the freeman chain, storing the current coordinate.


Constructor & Destructor Documentation

DGtal::FreemanChain::constIterator::constIterator (  ) 

Default Constructor. The object is not valid.

DGtal::FreemanChain::constIterator::constIterator ( const FreemanChain aChain,
unsigned int  n = 0 
)

Constructor. Nb: complexity in O(n).

Parameters:
aChain a Freeman chain,
n the position in [chain] (within 0 and chain.size()-1).
DGtal::FreemanChain::constIterator::constIterator ( const constIterator aOther  ) 

Copy constructor.

Parameters:
other the iterator to clone.
DGtal::FreemanChain::constIterator::~constIterator (  ) 

Destructor. Does nothing.


Member Function Documentation

PointI2D DGtal::FreemanChain::constIterator::get (  )  const
Returns:
the current coordinates.

Referenced by DGtal::FreemanChain::subsample().

const FreemanChain* DGtal::FreemanChain::constIterator::getChain (  )  const
Returns:
the associated Freeman chain.
unsigned int DGtal::FreemanChain::constIterator::getCode (  )  const
unsigned int DGtal::FreemanChain::constIterator::getPosition (  )  const
void DGtal::FreemanChain::constIterator::next (  ) 

Goes to the next point on the chain.

Referenced by DGtal::FreemanChain::findQuadrantChange(), and DGtal::FreemanChain::findQuadrantChange4().

void DGtal::FreemanChain::constIterator::nextInLoop (  ) 

Goes to the next point on the chain as if on a loop.

Referenced by DGtal::FreemanChain::cleanOuterSpikes(), DGtal::FreemanChain::isClosed(), and DGtal::FreemanChain::subsample().

bool DGtal::FreemanChain::constIterator::operator!= ( const constIterator aOther  )  const

Inequality operator.

Parameters:
aOther the iterator to compare with (must be defined on the same chain).
Returns:
'true' if their current positions differs.
PointI2D DGtal::FreemanChain::constIterator::operator* (  )  const
Returns:
the current coordinates.
constIterator& DGtal::FreemanChain::constIterator::operator++ (  ) 

Pre-increment. Goes to the next point on the chain.

constIterator& DGtal::FreemanChain::constIterator::operator-- (  ) 

Pre-decrement. Goes to the previous point on the chain.

bool DGtal::FreemanChain::constIterator::operator< ( const constIterator aOther  )  const

Inferior operator.

Parameters:
aOther the iterator to compare with (must be defined on the same chain).
Returns:
'true' if the current position of 'this' is before the current position of [other].
constIterator& DGtal::FreemanChain::constIterator::operator= ( const constIterator aOther  ) 

Assignment.

Parameters:
aOther the iterator to copy.
Returns:
a reference on 'this'.
bool DGtal::FreemanChain::constIterator::operator== ( const constIterator aOther  )  const

Equality operator.

Parameters:
aOther the iterator to compare with (must be defined on the same chain).
Returns:
'true' if their current positions coincide.
void DGtal::FreemanChain::constIterator::previous (  ) 

Goes to the previous point on the chain if possible.

Referenced by DGtal::FreemanChain::findQuadrantChange(), and DGtal::FreemanChain::findQuadrantChange4().

void DGtal::FreemanChain::constIterator::previousInLoop (  ) 

Goes to the previous point on the chain as if on a loop.

Referenced by DGtal::FreemanChain::cleanOuterSpikes(), and DGtal::FreemanChain::computeMLP().


Field Documentation

The Freeman chain visited by the iterator.

The current position in the word.

The current coordinates of the iterator.


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