DGtal 1.3.0
|
#include <DGtal/geometry/curves/FreemanChain.h>
Public Member Functions | |
ConstIterator () | |
ConstIterator (ConstAlias< FreemanChain > aChain, Index n=0) | |
ConstIterator (ConstAlias< FreemanChain > aChain, Index n, const Point &XY) | |
ConstIterator (const ConstIterator &aOther) | |
ConstIterator & | operator= (const ConstIterator &other) |
~ConstIterator () | |
const Point & | operator* () const |
const Point & | get () const |
ConstIterator & | operator++ () |
ConstIterator | operator++ (int) |
void | next () |
void | nextInLoop () |
Index | position () const |
const FreemanChain * | getChain () const |
char | getCode () const |
ConstIterator & | operator-- () |
ConstIterator | operator-- (int) |
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 FreemanChain * | myFc |
The Freeman chain visited by the iterator. More... | |
Index | myPos |
The current position in the word. More... | |
Point | myXY |
The current coordinates of the iterator. More... | |
This class represents an iterator on points defined by freeman chain, storing the current coordinate.
Definition at line 141 of file FreemanChain.h.
|
inline |
Default Constructor. The object is not valid.
Definition at line 165 of file FreemanChain.h.
DGtal::FreemanChain< TInteger >::ConstIterator::ConstIterator | ( | ConstAlias< FreemanChain > | aChain, |
Index | n = 0 |
||
) |
Constructor. Nb: complexity in O(n).
aChain | a Freeman chain, |
n | the position in [chain] (within 0 and chain.size()). |
|
inline |
Constructor. It is the user's responsability to make sure that the data's are consistent. No verification is performed.
Nb: complexity in O(1).
aChain | a Freeman chain, |
n | the position in [chain] (within 0 and chain.size()). |
XY | the point corresponding to the 'n'-th position of 'chain'. |
Definition at line 190 of file FreemanChain.h.
|
inline |
Copy constructor.
aOther | the iterator to clone. |
Definition at line 198 of file FreemanChain.h.
|
inline |
|
inline |
Definition at line 230 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myXY.
|
inline |
Definition at line 279 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myFc.
|
inline |
Definition at line 289 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::code(), DGtal::FreemanChain< TInteger >::ConstIterator::myFc, and DGtal::FreemanChain< TInteger >::ConstIterator::myPos.
void DGtal::FreemanChain< TInteger >::ConstIterator::next | ( | ) |
Goes to the next point on the chain.
Referenced by DGtal::FreemanChain< TInteger >::ConstIterator::operator++().
void DGtal::FreemanChain< TInteger >::ConstIterator::nextInLoop | ( | ) |
Goes to the next point on the chain as if on a loop.
|
inline |
Inequality operator.
aOther | the iterator to compare with (must be defined on the same chain). |
Definition at line 353 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myFc, and DGtal::FreemanChain< TInteger >::ConstIterator::myPos.
|
inline |
Definition at line 222 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myXY.
|
inline |
Pre-increment. Goes to the next point on the chain.
Definition at line 239 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::next().
|
inline |
Post-increment. Goes to the next point on the chain.
Definition at line 249 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::next().
|
inline |
Pre-decrement. Goes to the previous point on the chain.
Definition at line 300 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::previous().
|
inline |
Post-decrement. Goes to the previous point on the chain.
Definition at line 310 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::previous().
|
inline |
Inferior operator.
aOther | the iterator to compare with (must be defined on the same chain). |
Definition at line 368 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myFc, and DGtal::FreemanChain< TInteger >::ConstIterator::myPos.
ConstIterator & DGtal::FreemanChain< TInteger >::ConstIterator::operator= | ( | const ConstIterator & | other | ) |
Assignment.
other | the iterator to copy. |
|
inline |
Equality operator.
aOther | the iterator to compare with (must be defined on the same chain). |
Definition at line 338 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myFc, and DGtal::FreemanChain< TInteger >::ConstIterator::myPos.
|
inline |
Definition at line 270 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myPos.
void DGtal::FreemanChain< TInteger >::ConstIterator::previous | ( | ) |
Goes to the previous point on the chain if possible.
Referenced by DGtal::FreemanChain< TInteger >::ConstIterator::operator--().
void DGtal::FreemanChain< TInteger >::ConstIterator::previousInLoop | ( | ) |
Goes to the previous point on the chain as if on a loop.
|
private |
The Freeman chain visited by the iterator.
Definition at line 150 of file FreemanChain.h.
Referenced by DGtal::FreemanChain< TInteger >::ConstIterator::getChain(), DGtal::FreemanChain< TInteger >::ConstIterator::getCode(), DGtal::FreemanChain< TInteger >::ConstIterator::operator!=(), DGtal::FreemanChain< TInteger >::ConstIterator::operator<(), and DGtal::FreemanChain< TInteger >::ConstIterator::operator==().
|
private |
The current position in the word.
Definition at line 153 of file FreemanChain.h.
Referenced by DGtal::FreemanChain< TInteger >::ConstIterator::getCode(), DGtal::FreemanChain< TInteger >::ConstIterator::operator!=(), DGtal::FreemanChain< TInteger >::ConstIterator::operator<(), DGtal::FreemanChain< TInteger >::ConstIterator::operator==(), and DGtal::FreemanChain< TInteger >::ConstIterator::position().
|
private |
The current coordinates of the iterator.
Definition at line 156 of file FreemanChain.h.
Referenced by DGtal::FreemanChain< TInteger >::ConstIterator::get(), and DGtal::FreemanChain< TInteger >::ConstIterator::operator*().