DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
DGtal::GeometricalDCA< TConstIterator > Class Template Reference

#include <GeometricalDCA.h>

Collaboration diagram for DGtal::GeometricalDCA< TConstIterator >:
Collaboration graph
[legend]

Public Types

typedef TConstIterator ConstIterator
typedef GeometricalDCA
< ConstIterator
Self
typedef GeometricalDCA
< ReverseIterator
< ConstIterator > > 
Reverse
typedef
IteratorCirculatorTraits
< ConstIterator >::Value 
Pair
typedef Pair::first_type Point

Public Member Functions

 BOOST_STATIC_ASSERT ((ConceptUtils::SameType< typename Pair::first_type, typename Pair::second_type >::value))
 BOOST_STATIC_ASSERT ((Point::dimension==2))
 GeometricalDCA ()
 GeometricalDCA (const Self &other)
Selfoperator= (const Self &other)
 ~GeometricalDCA ()
bool operator== (const Self &other) const
bool operator!= (const Self &other) const
Self getSelf () const
Reverse getReverse () const
bool isValid () const
ConstIterator begin () const
ConstIterator end () const
bool isStraight () const
GeometricalDSSPtr getGeometricalDSSPtr () const
Circle getSeparatingCircle () const
void init (const ConstIterator &anIt)
bool extendForward ()
bool isExtendableForward ()
bool extendBackward ()
bool isExtendableBackward ()
void selfDisplay (std::ostream &out) const
std::string className () const

Private Types

typedef CowPtr< GeometricalDSS
< ConstIterator > > 
GeometricalDSSPtr
typedef CircleFrom3Points< PointCircle
typedef Point2ShapePredicate
< Circle, false, true > 
PInCirclePred
typedef Point2ShapePredicate
< Circle, true, true > 
QInCirclePred

Private Member Functions

template<typename TIterator >
bool isCircularlySeparable (const TIterator &itb, const TIterator &ite, const Point &aPole, Point &Pf, Point &Pl, Point &Qf, Point &Ql)

Private Attributes

ConstIterator myBegin
ConstIterator myEnd
GeometricalDSSPtr mySegPtr
Circle myCircle
bool myFlagIsInit

Detailed Description

template<typename TConstIterator>
class DGtal::GeometricalDCA< TConstIterator >

Aim: On-line recognition of a digital circular arcs (DCA) defined as a sequence of connected grid edges such that there is at least one (Euclidean) circle that separates the centers of the two incident pixels of each grid edge.

The algorithm iteratively calls a routine (isCircularlySeparable) that uses Preimage2D in order to compute the whole set of separating (Euclidean) circles passing through a given point. It returns 'false' if the set is empty and 'true' otherwise.

The algorithm may be divided into two steps:

For a DCA of \( n \) grid edges, a trivial upper bound of this algorithm is \( O(n^2) \) because the linear-time routine may be possibly called \( n \) times. But we observed in practice that the routine is called only a few times and that the algorithm is fast.

This class is a model of the concept CBidirectionalSegmentComputer.

It should be used with the Curve object (defined in StdDefs.h) and its IncidentPointsRange as follows:

Curve::IncidentPointsRange r = c.getIncidentPointsRange();
Curve::IncidentPointsRange::ConstIterator itEnd (r.end());
GeometricalDCA<Curve::IncidentPointsRange::ConstIterator> s;
//extension
s.init( r.begin() );
while ( ( s.end() != itEnd )
&&( s.extendForward() ) ) {}
Template Parameters:
TConstIteratorConstIterator type on STL pairs of 2D points
See also:
testGeometricalDCA.cpp exampleGeometricalDCA.cpp testGeometricalDSS.cpp exampleGeometricalDSS.cpp

Definition at line 112 of file GeometricalDCA.h.


Member Typedef Documentation

template<typename TConstIterator>
typedef CircleFrom3Points<Point> DGtal::GeometricalDCA< TConstIterator >::Circle
private

Definition at line 133 of file GeometricalDCA.h.

template<typename TConstIterator>
typedef TConstIterator DGtal::GeometricalDCA< TConstIterator >::ConstIterator

Definition at line 118 of file GeometricalDCA.h.

template<typename TConstIterator>
typedef CowPtr<GeometricalDSS<ConstIterator> > DGtal::GeometricalDCA< TConstIterator >::GeometricalDSSPtr
private

Definition at line 132 of file GeometricalDCA.h.

template<typename TConstIterator>
typedef IteratorCirculatorTraits<ConstIterator>::Value DGtal::GeometricalDCA< TConstIterator >::Pair

Definition at line 123 of file GeometricalDCA.h.

template<typename TConstIterator>
typedef Point2ShapePredicate<Circle,false,true> DGtal::GeometricalDCA< TConstIterator >::PInCirclePred
private

Definition at line 137 of file GeometricalDCA.h.

template<typename TConstIterator>
typedef Pair::first_type DGtal::GeometricalDCA< TConstIterator >::Point

Definition at line 126 of file GeometricalDCA.h.

template<typename TConstIterator>
typedef Point2ShapePredicate<Circle,true,true> DGtal::GeometricalDCA< TConstIterator >::QInCirclePred
private

Definition at line 139 of file GeometricalDCA.h.

template<typename TConstIterator>
typedef GeometricalDCA<ReverseIterator<ConstIterator> > DGtal::GeometricalDCA< TConstIterator >::Reverse

Definition at line 120 of file GeometricalDCA.h.

template<typename TConstIterator>
typedef GeometricalDCA<ConstIterator> DGtal::GeometricalDCA< TConstIterator >::Self

Definition at line 119 of file GeometricalDCA.h.


Constructor & Destructor Documentation

template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::GeometricalDCA ( )
inline

Constructor.

Definition at line 43 of file GeometricalDCA.ih.

References DGtal::false.

:myBegin(), myEnd(), mySegPtr(new GeometricalDSS<ConstIterator>()),
{
}
template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::GeometricalDCA ( const Self other)
inline

Copy constructor.

Parameters:
otherthe object to clone.

Definition at line 51 of file GeometricalDCA.ih.

:myBegin(other.myBegin), myEnd(other.myEnd), mySegPtr(other.mySegPtr),
myCircle(other.myCircle), myFlagIsInit(other.myFlagIsInit)
{
}
template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::~GeometricalDCA ( )
inline

Destructor.

Definition at line 75 of file GeometricalDCA.ih.

{
}

Member Function Documentation

template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::ConstIterator DGtal::GeometricalDCA< TConstIterator >::begin ( ) const
inline
Returns:
segment begin iterator.

Definition at line 174 of file GeometricalDCA.ih.

Referenced by DGtal::Display2DFactory::draw().

{
return myBegin;
}
template<typename TConstIterator>
DGtal::GeometricalDCA< TConstIterator >::BOOST_STATIC_ASSERT ( (ConceptUtils::SameType< typename Pair::first_type, typename Pair::second_type >::value)  )
template<typename TConstIterator>
DGtal::GeometricalDCA< TConstIterator >::BOOST_STATIC_ASSERT ( (Point::dimension==2)  )
template<typename TConstIterator >
std::string DGtal::GeometricalDCA< TConstIterator >::className ( ) const
inline
Returns:
the name of the class.

Definition at line 623 of file GeometricalDCA.ih.

Referenced by DGtal::Display2DFactory::draw().

{
return "GeometricalDCA";
}
template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::ConstIterator DGtal::GeometricalDCA< TConstIterator >::end ( ) const
inline
Returns:
segment end iterator.

Definition at line 182 of file GeometricalDCA.ih.

Referenced by DGtal::Display2DFactory::draw().

{
return myEnd;
}
template<typename TConstIterator >
bool DGtal::GeometricalDCA< TConstIterator >::extendBackward ( )
inline

Backward extension of the segment.

NB: linear in the size of the segment is the worst case

Definition at line 504 of file GeometricalDCA.ih.

{
ASSERT( mySegPtr.get() != 0 );
ConstIterator it( myBegin );
--it;
Pair aPair( *it );
Point aP( aPair.first );
Point aQ( aPair.second );
bool isOK = false;
{ //initialized
//predicates
if ( p1(aP)&&p2(aQ) )
isOK = true;
else
{ //update separating circle
if (!p1(aP))
{
Point Pf, Pl, Qf, Ql;
std::reverse_iterator<ConstIterator> ritb(myEnd);
std::reverse_iterator<ConstIterator> rite(myBegin);
if (isCircularlySeparable(ritb,rite,aP,Pf,Pl,Qf,Ql))
{
myCircle.init(aP,Pf,Ql);
isOK = true;
}
}
else if (!p2(aQ))
{
Point Pf, Pl, Qf, Ql;
std::reverse_iterator<ConstIterator> ritb(myEnd);
std::reverse_iterator<ConstIterator> rite(myBegin);
if (isCircularlySeparable(ritb,rite,aQ,Pf,Pl,Qf,Ql))
{
myCircle.init(aQ,Qf,Pl);
isOK = true;
}
}
else ASSERT( false && ("DGtal::GeometricalDCA<TConstIterator>::extendBackward(): impossible case") );
}
} else
{ //not initialized yet
if ( mySegPtr->extendBackward() ) isOK = true;
else
{
Point Pf, Pl, Qf, Ql;
std::reverse_iterator<ConstIterator> ritb(myEnd);
std::reverse_iterator<ConstIterator> rite(myBegin);
if (mySegPtr->isOppositeEndConvex())
{ //convex part
if (isCircularlySeparable(ritb,rite,aQ,Pf,Pl,Qf,Ql))
{
myCircle.init(aQ,Qf,Pl);
myFlagIsInit = true;
isOK = true;
}
}
else if (mySegPtr->isOppositeEndConcave())
{ //concave part
if (isCircularlySeparable(ritb,rite,aP,Pf,Pl,Qf,Ql))
{
myCircle.init(aP,Pf,Ql);
myFlagIsInit = true;
isOK = true;
}
}
else ASSERT( false && ("DGtal::GeometricalDCA<TConstIterator>::extendBackward(): impossible case") );
}
}
if (isOK)
{
myBegin = it;
return true;
} else return false;
}
template<typename TConstIterator >
bool DGtal::GeometricalDCA< TConstIterator >::extendForward ( )
inline

Forward extension of the segment.

NB: linear in the size of the segment is the worst case

Definition at line 354 of file GeometricalDCA.ih.

{
ASSERT( mySegPtr.get() != 0 );
Pair aPair( *myEnd );
Point aP( aPair.first );
Point aQ( aPair.second );
bool isOK = false;
{ //initialized
//predicates
if ( p1(aP)&&p2(aQ) )
isOK = true;
else
{ //update separating circle
if (!p1(aP))
{
Point Pf, Pl, Qf, Ql;
if (isCircularlySeparable(myBegin,myEnd,aP,Pf,Pl,Qf,Ql))
{
myCircle.init(Pf,Ql,aP);
isOK = true;
}
}
else if (!p2(aQ))
{
Point Pf, Pl, Qf, Ql;
if (isCircularlySeparable(myBegin,myEnd,aQ,Pf,Pl,Qf,Ql))
{
myCircle.init(Qf,Pl,aQ);
isOK = true;
}
}
else ASSERT( false && ("DGtal::GeometricalDCA<TConstIterator>::extendForward(): impossible case") );
}
} else
{ //not initialized yet
if ( mySegPtr->extendForward() ) isOK = true;
else
{
Point Pf, Pl, Qf, Ql;
if (mySegPtr->isConvex())
{ //convex part
if (isCircularlySeparable(myBegin,myEnd,aQ,Pf,Pl,Qf,Ql))
{
myCircle.init(Qf,Pl,aQ);
myFlagIsInit = true;
isOK = true;
}
}
else if (mySegPtr->isConcave())
{ //concave part
if (isCircularlySeparable(myBegin,myEnd,aP,Pf,Pl,Qf,Ql))
{
myCircle.init(Pf,Ql,aP);
myFlagIsInit = true;
isOK = true;
}
}
else ASSERT( false && ("DGtal::GeometricalDCA<TConstIterator>::extendForward(): impossible case") );
}
}
if (isOK)
{
++myEnd;
return true;
} else return false;
}
template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::GeometricalDSSPtr DGtal::GeometricalDCA< TConstIterator >::getGeometricalDSSPtr ( ) const
inline
Returns:
a cow pointer on the GeometricalDSS used during the initialization step.
See also:
isStraight

Definition at line 198 of file GeometricalDCA.ih.

Referenced by DGtal::Display2DFactory::draw().

{
return mySegPtr;
}
template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::Reverse DGtal::GeometricalDCA< TConstIterator >::getReverse ( ) const
inline
Returns:
a default-constructed instance of Reverse.

Definition at line 137 of file GeometricalDCA.ih.

{
return Reverse();
}
template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::Self DGtal::GeometricalDCA< TConstIterator >::getSelf ( ) const
inline
Returns:
a default-constructed instance of Self

Definition at line 146 of file GeometricalDCA.ih.

{
return Self();
}
template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::Circle DGtal::GeometricalDCA< TConstIterator >::getSeparatingCircle ( ) const
inline
Returns:
a separating circle.

Definition at line 206 of file GeometricalDCA.ih.

Referenced by DGtal::Display2DFactory::draw().

{
return myCircle;
}
template<typename TConstIterator >
void DGtal::GeometricalDCA< TConstIterator >::init ( const ConstIterator anIt)
inline

Segment initialization

Parameters:
anItany iterator

Definition at line 273 of file GeometricalDCA.ih.

References DGtal::GeometricalDCA< TConstIterator >::init().

Referenced by DGtal::GeometricalDCA< TConstIterator >::init().

{
myFlagIsInit = false;
//initialize the iterators
myBegin = anIt;
myEnd = anIt;
++myEnd;
//...the geometrical DSS
mySegPtr->init( anIt );
//...the circle as degenerated
Pair aPair( *anIt);
myCircle = Circle(aPair.first, aPair.first, aPair.first);
}
template<typename TConstIterator >
template<typename TIterator >
bool DGtal::GeometricalDCA< TConstIterator >::isCircularlySeparable ( const TIterator &  itb,
const TIterator &  ite,
const Point aPole,
Point Pf,
Point Pl,
Point Qf,
Point Ql 
)
inlineprivate

Check if the two sets of points can be separated by circles passing through the given point aPole. If yes, return the four points of support of the partial preimage. The pole and either Pf and Ql or Qf and Pl implicitely describe a separating circle.

Parameters:
itbbegin iterator on STL pairs of 2D points.
iteend iterator on STL pairs of 2D points.
aPolethe point the circles pass through.
Pf(returned) first inner point of support.
Pl(returned) last inner point of support.
Qf(returned) first outer point of support.
Ql(returned) last outer point of support.
Template Parameters:
TIteratortype of iterator (normal or reverse type)
Returns:
'true' if the sets of points can be separated, 'false' otherwise

Definition at line 218 of file GeometricalDCA.ih.

References DGtal::Preimage2D< Shape >::addBack(), DGtal::Preimage2D< Shape >::addFront(), DGtal::Preimage2D< Shape >::getLf(), DGtal::Preimage2D< Shape >::getLl(), DGtal::Preimage2D< Shape >::getUf(), and DGtal::Preimage2D< Shape >::getUl().

{
ASSERT( itb != ite );
TIterator it( itb );
Pair currentPair( *it );
//preimage of circles passing through aPole
CircleFrom2Points<Point> aCircle( aPole );
Preimage2D<CircleFrom2Points<Point> >
thePreimage( currentPair.first, currentPair.second, aCircle );
bool isOK = true;
++it;
if (it != ite)
{ //if more than one pair
currentPair = *it;
if ( thePreimage.addFront(currentPair.first, currentPair.second) )
{ //if CW oriented
isOK = true;
while ( (it != ite)&&(isOK) )
{
currentPair = *it;
isOK = thePreimage.addFront(currentPair.first, currentPair.second);
++it;
}
}
else if ( thePreimage.addBack(currentPair.first, currentPair.second) )
{ // if CCW oriented
isOK = true;
while ( (it != ite)&&(isOK) )
{
currentPair = *it;
isOK = thePreimage.addBack(currentPair.first, currentPair.second);
++it;
}
} else isOK = false;
} //if only one pair => circularly separable
if (isOK)
{//points of support
Pf = thePreimage.getUf();
Pl = thePreimage.getUl();
Qf = thePreimage.getLf();
Ql = thePreimage.getLl();
return true;
} else return false;
}
template<typename TConstIterator >
bool DGtal::GeometricalDCA< TConstIterator >::isExtendableBackward ( )
inline

Backward extension test.

NB: linear in the size of the segment is the worst case

Definition at line 435 of file GeometricalDCA.ih.

{
ASSERT( mySegPtr.get() != 0 );
ConstIterator it( myBegin );
--it;
Pair aPair( *it );
Point aP( aPair.first );
Point aQ( aPair.second );
bool isOK = false;
{ //initialized
//predicates
if ( p1(aP)&&p2(aQ) )
isOK = true;
else
{ //update separating circle
if (!p1(aP))
{
Point Pf, Pl, Qf, Ql;
std::reverse_iterator<ConstIterator> ritb(myEnd);
std::reverse_iterator<ConstIterator> rite(myBegin);
if (isCircularlySeparable(ritb,rite,aP,Pf,Pl,Qf,Ql))
isOK = true;
}
else if (!p2(aQ))
{
Point Pf, Pl, Qf, Ql;
std::reverse_iterator<ConstIterator> ritb(myEnd);
std::reverse_iterator<ConstIterator> rite(myBegin);
if (isCircularlySeparable(ritb,rite,aQ,Pf,Pl,Qf,Ql))
isOK = true;
}
else ASSERT( false && ("DGtal::GeometricalDCA<TConstIterator>::extendBackward(): impossible case") );
}
} else
{ //not initialized yet
if ( mySegPtr->extendBackward() ) isOK = true;
else
{
Point Pf, Pl, Qf, Ql;
std::reverse_iterator<ConstIterator> ritb(myEnd);
std::reverse_iterator<ConstIterator> rite(myBegin);
if (mySegPtr->isOppositeEndConvex())
{ //convex part
if (isCircularlySeparable(ritb,rite,aQ,Pf,Pl,Qf,Ql))
isOK = true;
}
else if (mySegPtr->isOppositeEndConcave())
{ //concave part
if (isCircularlySeparable(ritb,rite,aP,Pf,Pl,Qf,Ql))
isOK = true;
}
else ASSERT( false && ("DGtal::GeometricalDCA<TConstIterator>::extendBackward(): impossible case") );
}
}
return isOK;
}
template<typename TConstIterator >
bool DGtal::GeometricalDCA< TConstIterator >::isExtendableForward ( )
inline

Forward extension test.

NB: linear in the size of the segment is the worst case

Definition at line 293 of file GeometricalDCA.ih.

{
ASSERT( mySegPtr.get() != 0 );
Pair aPair( *myEnd );
Point aP( aPair.first );
Point aQ( aPair.second );
bool isOK = false;
{ //initialized
//predicates
if ( p1(aP)&&p2(aQ) )
isOK = true;
else
{ //checks if the separating circle can be updated
if (!p1(aP))
{
Point Pf, Pl, Qf, Ql;
if (isCircularlySeparable(myBegin,myEnd,aP,Pf,Pl,Qf,Ql))
isOK = true;
}
else if (!p2(aQ))
{
Point Pf, Pl, Qf, Ql;
if (isCircularlySeparable(myBegin,myEnd,aQ,Pf,Pl,Qf,Ql))
isOK = true;
}
else ASSERT( false && ("DGtal::GeometricalDCA<TConstIterator>::isExtendableForward(): impossible case") );
}
} else
{ //not initialized yet
if ( mySegPtr->extendForward() ) isOK = true;
else
{
Point Pf, Pl, Qf, Ql;
if (mySegPtr->isConvex())
{ //convex part
if (isCircularlySeparable(myBegin,myEnd,aQ,Pf,Pl,Qf,Ql))
isOK = true;
}
else if (mySegPtr->isConcave())
{ //concave part
if (isCircularlySeparable(myBegin,myEnd,aP,Pf,Pl,Qf,Ql))
isOK = true;
}
else ASSERT( false && ("DGtal::GeometricalDCA<TConstIterator>::isExtendableForward(): impossible case") );
}
}
return isOK;
}
template<typename TConstIterator >
bool DGtal::GeometricalDCA< TConstIterator >::isStraight ( ) const
inline
Returns:
boolean equal to 'true' is the segment is straight (infinite radius) and 'false' otherwise.

Definition at line 190 of file GeometricalDCA.ih.

Referenced by DGtal::Display2DFactory::draw().

{
return !myFlagIsInit;
}
template<typename TConstIterator >
bool DGtal::GeometricalDCA< TConstIterator >::isValid ( ) const
inline

Checks the validity/consistency of the object.

Returns:
'true' if the object is valid, 'false' otherwise.

Definition at line 159 of file GeometricalDCA.ih.

References DGtal::GeometricalDCA< TConstIterator >::isValid().

Referenced by DGtal::Display2DFactory::draw(), DGtal::GeometricalDCA< TConstIterator >::isValid(), and DGtal::GeometricalDCA< TConstIterator >::operator==().

{
if ( mySegPtr.get() != 0 )
{
return mySegPtr->isValid();
}
else
{
return false;
}
}
template<typename TConstIterator >
bool DGtal::GeometricalDCA< TConstIterator >::operator!= ( const Self other) const
inline

Difference operator

Parameters:
otherthe object to compare with.
Returns:
'true' if not equal, 'false' otherwise.

NB: linear in the size of the segment

Definition at line 129 of file GeometricalDCA.ih.

{
return !(*this == other);
}
template<typename TConstIterator >
DGtal::GeometricalDCA< TConstIterator >::Self & DGtal::GeometricalDCA< TConstIterator >::operator= ( const Self other)
inline

Assignment.

Parameters:
otherthe object to copy.
Returns:
a reference on 'this'.

Definition at line 60 of file GeometricalDCA.ih.

References DGtal::GeometricalDCA< TConstIterator >::myBegin, DGtal::GeometricalDCA< TConstIterator >::myCircle, DGtal::GeometricalDCA< TConstIterator >::myEnd, DGtal::GeometricalDCA< TConstIterator >::myFlagIsInit, and DGtal::GeometricalDCA< TConstIterator >::mySegPtr.

{
if ( this != &other )
{
myBegin = other.myBegin;
myEnd = other.myEnd;
mySegPtr = other.mySegPtr;
myCircle = other.myCircle;
myFlagIsInit = other.myFlagIsInit;
}
return *this;
}
template<typename TConstIterator >
bool DGtal::GeometricalDCA< TConstIterator >::operator== ( const Self other) const
inline

Equality operator

Parameters:
otherthe object to compare with.
Returns:
'true' if equal, 'false' otherwise

NB: linear in the size of the segment

Definition at line 82 of file GeometricalDCA.ih.

References DGtal::GeometricalDCA< TConstIterator >::isValid(), DGtal::GeometricalDCA< TConstIterator >::myBegin, and DGtal::GeometricalDCA< TConstIterator >::myEnd.

{
if (isValid()&&other.isValid())
{
bool flag1 = true;
{
ConstIterator first1 (myBegin);
ConstIterator first2 (other.myBegin);
while ( ( ( first1 != myEnd )
||( first2 != other.myEnd ) )
&& (flag1) )
{
Pair pair1( *first1 );
Pair pair2( *first2 );
if ( (pair1.first != pair2.first)||(pair1.second != pair2.second) ) flag1 = false;
++first1; ++first2;
}
if ( (first1 != myEnd) || (first2 != other.myEnd) ) flag1 = false;
}
bool flag2 = true;
{
std::reverse_iterator<ConstIterator> rfirst1(myEnd);
ConstIterator first2 = other.myBegin;
while ( ( ( rfirst1 != std::reverse_iterator<ConstIterator>(myBegin) )
||( first2 != other.myEnd ) )
&& (flag2) )
{
Pair pair1( *rfirst1 );
Pair pair2( *first2 );
if ( (pair1.first != pair2.first)||(pair1.second != pair2.second) ) flag2 = false;
++rfirst1; ++first2;
}
if ( (rfirst1 != std::reverse_iterator<ConstIterator>(myBegin))
|| (first2 != other.myEnd) ) flag2 = false;
}
return ( flag1 || flag2 );
}
else
{
return ( (!isValid()) && (!other.isValid()) );
}
}
template<typename TConstIterator >
void DGtal::GeometricalDCA< TConstIterator >::selfDisplay ( std::ostream &  out) const
inline

Writes/Displays the object on an output stream.

Parameters:
outthe output stream where the object is written.

Definition at line 596 of file GeometricalDCA.ih.

{
out << std::endl;
out << "[GeometricalDCA]" << std::endl;
if (isValid())
{
Pair firstPair( *myBegin );
out << "\t From " << firstPair.first << firstPair.second << std::endl;
ConstIterator it (myEnd);
--it;
Pair lastPair( *it );
out << "\t To " << lastPair.first << lastPair.second << std::endl;
out << myCircle << std::endl;
else
out << "infinite radius" << std::endl;
}
else
{
out << "\t not valid" << std::endl;
}
out << "[end of GeometricalDCA]" << std::endl;
}

Field Documentation

template<typename TConstIterator>
ConstIterator DGtal::GeometricalDCA< TConstIterator >::myBegin
private
template<typename TConstIterator>
Circle DGtal::GeometricalDCA< TConstIterator >::myCircle
private

Separating circle.

Definition at line 304 of file GeometricalDCA.h.

Referenced by DGtal::GeometricalDCA< TConstIterator >::operator=().

template<typename TConstIterator>
ConstIterator DGtal::GeometricalDCA< TConstIterator >::myEnd
private
template<typename TConstIterator>
bool DGtal::GeometricalDCA< TConstIterator >::myFlagIsInit
private

Flag equal to 'true' if mySegPtr has finished its extension 'false' otherwise.

Definition at line 309 of file GeometricalDCA.h.

Referenced by DGtal::GeometricalDCA< TConstIterator >::operator=().

template<typename TConstIterator>
GeometricalDSSPtr DGtal::GeometricalDCA< TConstIterator >::mySegPtr
private

Pointer to the geometrical DSS.

Definition at line 300 of file GeometricalDCA.h.

Referenced by DGtal::GeometricalDCA< TConstIterator >::operator=().


The documentation for this class was generated from the following files: