DGtal
1.5.beta
|
#include <DGtal/geometry/curves/FreemanChain.h>
Public Types | |
using | iterator_category = std::bidirectional_iterator_tag |
using | value_type = Point |
using | difference_type = int |
using | pointer = Point * |
using | reference = Point |
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.
using DGtal::FreemanChain< TInteger >::ConstIterator::difference_type = int |
Definition at line 147 of file FreemanChain.h.
using DGtal::FreemanChain< TInteger >::ConstIterator::iterator_category = std::bidirectional_iterator_tag |
Definition at line 145 of file FreemanChain.h.
using DGtal::FreemanChain< TInteger >::ConstIterator::pointer = Point* |
Definition at line 148 of file FreemanChain.h.
using DGtal::FreemanChain< TInteger >::ConstIterator::reference = Point |
Definition at line 149 of file FreemanChain.h.
using DGtal::FreemanChain< TInteger >::ConstIterator::value_type = Point |
Definition at line 146 of file FreemanChain.h.
|
inline |
Default Constructor. The object is not valid.
Definition at line 171 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. |
|
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. |
XY | the point corresponding to the 'n'-th position of 'chain'. |
Definition at line 196 of file FreemanChain.h.
|
inline |
Copy constructor.
aOther | the iterator to clone. |
Definition at line 204 of file FreemanChain.h.
|
inline |
|
inline |
Definition at line 236 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myXY.
|
inline |
Definition at line 285 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myFc.
|
inline |
Definition at line 295 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 359 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myFc, and DGtal::FreemanChain< TInteger >::ConstIterator::myPos.
|
inline |
Definition at line 228 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myXY.
|
inline |
Pre-increment. Goes to the next point on the chain.
Definition at line 245 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::next().
|
inline |
Post-increment. Goes to the next point on the chain.
Definition at line 255 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::next().
|
inline |
Pre-decrement. Goes to the previous point on the chain.
Definition at line 306 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::previous().
|
inline |
Post-decrement. Goes to the previous point on the chain.
Definition at line 316 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 374 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 344 of file FreemanChain.h.
References DGtal::FreemanChain< TInteger >::ConstIterator::myFc, and DGtal::FreemanChain< TInteger >::ConstIterator::myPos.
|
inline |
Definition at line 276 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 156 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 159 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 162 of file FreemanChain.h.
Referenced by DGtal::FreemanChain< TInteger >::ConstIterator::get(), and DGtal::FreemanChain< TInteger >::ConstIterator::operator*().