DGtal 1.3.0
|
Aim: Specific iterator to visit all the maximal segments of a saturated segmentation. More...
#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 SaturatedSegmentationTest(), segmentationIntoDSSs(), and segmentationIntoMaximalDSSs().
|
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::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::end | ( | ) | const |
Referenced by SaturatedSegmentationTest(), segmentationIntoDSSs(), and segmentationIntoMaximalDSSs().
SegmentComputer DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::get | ( | ) | const |
|
private |
Computes the first maximal segment of the segmentation.
|
private |
Computes the last maximal segment of the segmentation.
bool DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::intersectNext | ( | ) | const |
bool DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::intersectPrevious | ( | ) | const |
|
inline |
Checks the validity/consistency of the object.
Definition at line 278 of file SaturatedSegmentation.h.
References DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::myFlagIsValid.
|
private |
Goes to the next maximal segment (if possible).
bool DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator!= | ( | const SegmentComputerIterator & | aOther | ) | const |
Inequality operator.
aOther | the iterator to compare with |
const SegmentComputer & DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator* | ( | ) | const |
SegmentComputerIterator & DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator++ | ( | ) |
Pre-increment. Goes to the next maximal segment (if possible).
Nb: complexity in O(n).
const SegmentComputer * DGtal::SaturatedSegmentation< TSegmentComputer >::SegmentComputerIterator::operator-> | ( | ) | const |
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 |
|
friend |
Definition at line 233 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.