DGtal
0.6.devel
|
#include <MaximalSegments.h>
Data Structures | |
class | SegmentIterator |
Public Types | |
typedef TSegment | Segment |
typedef TSegment::Reverse | ReverseSegment |
typedef TSegment::ConstIterator | Iterator |
typedef ReverseSegment::ConstIterator | ReverseIterator |
Public Member Functions | |
MaximalSegments () | |
MaximalSegments (const Iterator &beginIt, const Iterator &endIt, const Segment &aSegment, const bool &aFlag) | |
void | init (const Iterator &beginIt, const Iterator &endIt, const Segment &aSegment, const bool &aFlag) |
~MaximalSegments () | |
MaximalSegments::SegmentIterator | begin () |
MaximalSegments::SegmentIterator | end () |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Private Member Functions | |
MaximalSegments (const MaximalSegments &other) | |
MaximalSegments & | operator= (const MaximalSegments &other) |
Private Attributes | |
Iterator | myBegin |
Iterator | myEnd |
Iterator | myFirstMaximalSegmentBack |
Segment | mySegment |
bool | isClosed |
Aim: Computes the set of maximal segments of a sequence. Maximal segments are segments that cannot be included in other segments. This class is a model of CDecomposition.
Description of template class 'MaximalSegments'
This class is templated by 'TSegment', a model of CBidirectionnalSegmentComputer, i.e. an object that is able to manage the on-line recognition of a given class of segments (4-connected DSS, 8-connected DSS, thick segment, etc.) 'TSegment' must have an internal type 'Iterator' that is a means of of accessing the sequence elements. 'TSegment' must have the methods init(), extendForward() and extendBackward(), taking an input parameter of type 'Iterator'. The last two methods must return a boolean equal to TRUE if the extension is possible and has been successfully performed and FALSE otherwise.
In the short example below, the parameters of the maximal 8-connected DSSs of a sequence stored in a STL vector are sent to the standard output. The set of maximal DSSs of a sequence is also called tangential cover.
Definition at line 109 of file MaximalSegments.h.
typedef TSegment::ConstIterator DGtal::deprecated::MaximalSegments< TSegment >::Iterator |
Definition at line 116 of file MaximalSegments.h.
typedef ReverseSegment::ConstIterator DGtal::deprecated::MaximalSegments< TSegment >::ReverseIterator |
Definition at line 117 of file MaximalSegments.h.
typedef TSegment::Reverse DGtal::deprecated::MaximalSegments< TSegment >::ReverseSegment |
Definition at line 115 of file MaximalSegments.h.
typedef TSegment DGtal::deprecated::MaximalSegments< TSegment >::Segment |
Definition at line 114 of file MaximalSegments.h.
|
inline |
DGtal::deprecated::MaximalSegments< TSegment >::MaximalSegments | ( | const Iterator & | aBegin, |
const Iterator & | aEnd, | ||
const Segment & | aSegment, | ||
const bool & | aFlag | ||
) |
Constructor. Nb: The sequence is processed as a closed one by default.
begin,begin | iterator on a sequence |
end,end | iterator on a sequence |
aSegment,a | segment computer |
aFlag | a boolean equal to TRUE to decompose the digital curve as a closed one, FALSE otherwise |
Constructor.
Definition at line 469 of file MaximalSegments.ih.
|
inline |
|
private |
Copy constructor.
other | the object to clone. |
|
inline |
Iterator service.
Iterator service.
Definition at line 519 of file MaximalSegments.ih.
Referenced by DGtal::deprecated::MaximalSegments< TSegment >::SegmentIterator::extensionInLoop().
|
inline |
Iterator service.
Iterator service.
Definition at line 532 of file MaximalSegments.ih.
|
inline |
Init. Nb: The sequence is processed as a closed one by default.
begin,begin | iterator on a sequence |
end,end | iterator on a sequence |
aSegment,a | segment computer |
aFlag | a boolean equal to TRUE to decompose the digital curve as a closed one, FALSE otherwise |
Init.
Definition at line 488 of file MaximalSegments.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 557 of file MaximalSegments.ih.
|
private |
Assignment.
other | the object to copy. |
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 545 of file MaximalSegments.ih.
|
private |
boolean equal to TRUE if the sequence has to be processed as closed, FALSE otherwise
Definition at line 438 of file MaximalSegments.h.
|
private |
begin iterator (pointing at the first element)
Definition at line 416 of file MaximalSegments.h.
|
private |
end iterator (pointing after the last element)
Definition at line 421 of file MaximalSegments.h.
Referenced by DGtal::deprecated::MaximalSegments< TSegment >::SegmentIterator::SegmentIterator().
|
private |
back iterator (first element) of the first maximal segment
Definition at line 427 of file MaximalSegments.h.
|
private |
a segment Computer
Definition at line 432 of file MaximalSegments.h.
Referenced by DGtal::deprecated::MaximalSegments< TSegment >::SegmentIterator::firstMaximalSegment(), DGtal::deprecated::MaximalSegments< TSegment >::SegmentIterator::get(), DGtal::deprecated::MaximalSegments< TSegment >::SegmentIterator::nextMaximalSegment(), DGtal::deprecated::MaximalSegments< TSegment >::SegmentIterator::operator*(), and DGtal::deprecated::MaximalSegments< TSegment >::SegmentIterator::operator=().