DGtal
0.9.3
|
#include <DGtal/geometry/curves/SaturatedSegmentation.h>
Public Types | |
typedef SaturatedSegmentation::SegmentComputer | SegmentComputer |
typedef SegmentComputer::ConstIterator | ConstIterator |
Public Member Functions | |
SegmentComputerIterator (const SaturatedSegmentation< 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++ () |
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 | |
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) |
void | nextMaximalSegment () |
void | initFirstMaximalSegment () |
void | initLastMaximalSegment () |
Private Attributes | |
const SaturatedSegmentation< TSegmentComputer > * | myS |
SegmentComputer | mySegmentComputer |
bool | myFlagIsValid |
ConstIterator | myLastMaximalSegmentBegin |
ConstIterator | myLastMaximalSegmentEnd |
bool | myFlagIntersectNext |
bool | myFlagIntersectPrevious |
bool | myFlagIsLast |
Friends | |
class | SaturatedSegmentation< TSegmentComputer > |
Aim: Specific iterator to visit all the maximal segments of a saturated segmentation.
Description of template class 'SaturatedSegmentation::SegmentComputerIterator'
Definition at line 179 of file SaturatedSegmentation.h.
typedef SegmentComputer::ConstIterator DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::ConstIterator |
Definition at line 186 of file SaturatedSegmentation.h.
typedef SaturatedSegmentation::SegmentComputer DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::SegmentComputer |
Definition at line 185 of file SaturatedSegmentation.h.
DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::SegmentComputerIterator | ( | const SaturatedSegmentation< 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 |
DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::SegmentComputerIterator | ( | const SegmentComputerIterator & | aOther | ) |
Copy constructor.
aOther | the iterator to clone. |
DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::~SegmentComputerIterator | ( | ) |
Destructor. Does nothing.
const ConstIterator DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::begin | ( | ) | const |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid(), and DGtal::SaturatedSegmentation< TSegmentComputer >::SaturatedSegmentation().
|
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 |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
|
private |
|
private |
|
private |
Checks if the current segment intersects the next one (if exists).
it | end of the current segment |
NB: no verification
const ConstIterator DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::end | ( | ) | const |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid(), and DGtal::SaturatedSegmentation< TSegmentComputer >::SaturatedSegmentation().
SegmentComputer DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::get | ( | ) | const |
|
private |
Computes the first maximal segment of the segmentation.
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
|
private |
Computes the last maximal segment of the segmentation.
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
bool DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::intersectNext | ( | ) | const |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
bool DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::intersectPrevious | ( | ) | const |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
|
inline |
Checks the validity/consistency of the object.
Definition at line 278 of file SaturatedSegmentation.h.
References DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::begin(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::doesIntersectNext(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::end(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::initFirstMaximalSegment(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::initLastMaximalSegment(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::intersectNext(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::intersectPrevious(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::myFlagIsValid, DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::nextMaximalSegment(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator!=(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator*(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator++(), DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator->(), and DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator==().
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SaturatedSegmentation().
|
private |
Goes to the next maximal segment (if possible).
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
bool DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator!= | ( | const SegmentComputerIterator & | aOther | ) | const |
Inequality operator.
aOther | the iterator to compare with |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
const SegmentComputer& DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator* | ( | ) | const |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
SegmentComputerIterator& DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator++ | ( | ) |
Pre-increment. Goes to the next maximal segment (if possible).
Nb: complexity in O(n).
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
const SegmentComputer* DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator-> | ( | ) | const |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
SegmentComputerIterator& DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator= | ( | const SegmentComputerIterator & | aOther | ) |
Assignment.
aOther | the iterator to copy. |
bool DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator== | ( | const SegmentComputerIterator & | aOther | ) | const |
Equality operator.
aOther | the iterator to compare with |
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
|
friend |
Definition at line 239 of file SaturatedSegmentation.h.
|
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 220 of file SaturatedSegmentation.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 227 of file SaturatedSegmentation.h.
|
private |
A flag equal to TRUE if *this is the last maximal segment, FALSE otherwise
Definition at line 233 of file SaturatedSegmentation.h.
|
private |
A flag equal to TRUE if *this is valid, FALSE otherwise
Definition at line 204 of file SaturatedSegmentation.h.
Referenced by DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::isValid().
|
private |
Begin iterator of the last maximal segment of the segmentation
Definition at line 209 of file SaturatedSegmentation.h.
|
private |
End iterator of the last maximal segment of the segmentation
Definition at line 213 of file SaturatedSegmentation.h.
|
private |
Pointer to the segmentation
Definition at line 194 of file SaturatedSegmentation.h.
|
private |
The current segment
Definition at line 199 of file SaturatedSegmentation.h.