DGtal 2.0.0
|
Aim: Specific iterator to visit all the segments of a greedy segmentation. More...
#include <DGtal/geometry/curves/GreedySegmentation.h>
Public Types | |
typedef GreedySegmentation::SegmentComputer | SegmentComputer |
typedef SegmentComputer::ConstIterator | ConstIterator |
Public Member Functions | |
SegmentComputerIterator (const GreedySegmentation< TSegmentComputer > *aSegmentation, const TSegmentComputer &aSegmentComputer, const bool &aFlag) | |
SegmentComputerIterator (const SegmentComputerIterator &aOther) | |
SegmentComputerIterator & | operator= (const SegmentComputerIterator &aOther) |
~SegmentComputerIterator () | |
bool | isValid () const |
const SegmentComputer & | operator* () const |
SegmentComputer | get () const |
const SegmentComputer * | operator-> () const |
SegmentComputerIterator & | operator++ () |
void | next () |
bool | operator== (const SegmentComputerIterator &aOther) const |
bool | operator!= (const SegmentComputerIterator &aOther) const |
bool | intersectNext () const |
bool | intersectPrevious () const |
const ConstIterator | begin () const |
const ConstIterator | end () const |
Private Member Functions | |
void | longestSegment (const ConstIterator &it) |
bool | doesIntersectNext (const ConstIterator &it, const ConstIterator &itb, const ConstIterator &ite) |
bool | doesIntersectNext (const ConstIterator &it, const ConstIterator &itb, const ConstIterator &ite, IteratorType) |
bool | doesIntersectNext (const ConstIterator &it, const ConstIterator &itb, const ConstIterator &ite, CirculatorType) |
bool | doesIntersectNext (const ConstIterator &it) |
Private Attributes | |
const GreedySegmentation< TSegmentComputer > * | myS |
SegmentComputer | mySegmentComputer |
bool | myFlagIsValid |
bool | myFlagIntersectNext |
bool | myFlagIntersectPrevious |
bool | myFlagIsLast |
Friends | |
class | GreedySegmentation< TSegmentComputer > |
Aim: Specific iterator to visit all the segments of a greedy segmentation.
Description of template class 'SaturatedSegmentation::SegmentComputerIterator'
Definition at line 169 of file GreedySegmentation.h.
typedef SegmentComputer::ConstIterator DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::ConstIterator |
Definition at line 176 of file GreedySegmentation.h.
typedef GreedySegmentation::SegmentComputer DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::SegmentComputer |
Definition at line 175 of file GreedySegmentation.h.
DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::SegmentComputerIterator | ( | const GreedySegmentation< TSegmentComputer > * | aSegmentation, |
const TSegmentComputer & | aSegmentComputer, | ||
const bool & | aFlag ) |
Constructor.
Nb: complexity in O(n).
aSegmentation | the object that knows the range bounds |
aSegmentComputer | an online segment recognition algorithm |
aFlag | 'true' to build a valid object, 'false' otherwise |
References DGtal::GreedySegmentation< TSegmentComputer >::GreedySegmentation().
Referenced by operator!=(), operator++(), operator=(), operator==(), and SegmentComputerIterator().
DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::SegmentComputerIterator | ( | const SegmentComputerIterator & | aOther | ) |
DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::~SegmentComputerIterator | ( | ) |
Destructor. Does nothing.
const ConstIterator DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::begin | ( | ) | const |
|
private |
Checks if the current segment intersects the next one (if exists).
it | end of the current segment |
NB: no verification
|
private |
Checks if the current segment intersects the next one.
it | end of the current segment |
itb | begin iterator of the underlying range |
ite | end iterator of the underlying range |
|
private |
|
private |
const ConstIterator DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::end | ( | ) | const |
SegmentComputer DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::get | ( | ) | const |
bool DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::intersectNext | ( | ) | const |
bool DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::intersectPrevious | ( | ) | const |
|
inline |
Checks the validity/consistency of the object.
Definition at line 259 of file GreedySegmentation.h.
References myFlagIsValid.
|
private |
Computes the longest possible segment from [it]
it | a given iterator |
Nb: complexity in O(n).
void DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::next | ( | ) |
Goes to the next segment (if possible).
Nb: complexity in O(n).
bool DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::operator!= | ( | const SegmentComputerIterator & | aOther | ) | const |
Inequality operator.
aOther | the iterator to compare with |
References SegmentComputerIterator().
const SegmentComputer & DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::operator* | ( | ) | const |
SegmentComputerIterator & DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::operator++ | ( | ) |
Pre-increment. Goes to the next segment (if possible).
Nb: complexity in O(n).
References SegmentComputerIterator().
const SegmentComputer * DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::operator-> | ( | ) | const |
SegmentComputerIterator & DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::operator= | ( | const SegmentComputerIterator & | aOther | ) |
Assignment.
aOther | the iterator to copy. |
References SegmentComputerIterator().
bool DGtal::GreedySegmentation< TSegmentComputer >::SegmentComputerIterator::operator== | ( | const SegmentComputerIterator & | aOther | ) | const |
Equality operator.
aOther | the iterator to compare with |
References SegmentComputerIterator().
|
friend |
Definition at line 213 of file GreedySegmentation.h.
References DGtal::GreedySegmentation< TSegmentComputer >::GreedySegmentation(), and myFlagIsLast.
|
private |
A flag equal to TRUE if the current segment intersects the next one, FALSE otherwise (and FALSE if the current segment is the last one)
Definition at line 201 of file GreedySegmentation.h.
|
private |
A flag equal to TRUE if the current segment intersects the previous one, FALSE otherwise (and FALSE if the current segment is the first one)
Definition at line 208 of file GreedySegmentation.h.
|
private |
A flag equal to TRUE if *this has reached the end, FALSE otherwise
Definition at line 213 of file GreedySegmentation.h.
Referenced by GreedySegmentation< TSegmentComputer >.
|
private |
A flag equal to TRUE if *this is valid, FALSE otherwise
Definition at line 194 of file GreedySegmentation.h.
Referenced by isValid().
|
private |
Pointer to the segmentation
Definition at line 184 of file GreedySegmentation.h.
|
private |
The current segment
Definition at line 189 of file GreedySegmentation.h.