35 #if defined(AlphaThickSegmentComputer_RECURSES) 36 #error Recursive header files inclusion detected in AlphaThickSegmentComputer.h 37 #else // defined(AlphaThickSegmentComputer_RECURSES) 39 #define AlphaThickSegmentComputer_RECURSES 41 #if !defined AlphaThickSegmentComputer_h 43 #define AlphaThickSegmentComputer_h 48 #include "DGtal/base/Common.h" 49 #include "DGtal/base/ReverseIterator.h" 50 #include "DGtal/kernel/SpaceND.h" 51 #include "DGtal/geometry/surfaces/ParallelStrip.h" 52 #include "DGtal/geometry/tools/MelkmanConvexHull.h" 53 #include "DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.h" 125 template <
typename TInputPoint,
126 typename TConstIterator =
typename std::vector< TInputPoint >::const_iterator >
145 typedef typename InputPointContainer::size_type
Size;
149 typedef typename InputPointContainer::iterator
Iterator;
199 const double thickCompPrecision=1e-6);
308 ConstIterator
begin()
const;
317 ConstIterator
end()
const;
339 void init(
const ConstIterator &it);
435 std::pair<std::pair<InputPoint, InputPoint>, InputPoint>
467 double getMu()
const;
473 double getNu()
const;
523 const InputPoint &aLastPt,
524 PointD &pt1LongestSegment1,
525 PointD &pt2LongestSegment1,
526 PointD &pt3LongestSegment2,
527 PointD &pt4LongestSegment2,
528 double minVisibleWidthBounds = 0.2)
const;
550 PointD &pt2LongestSegment1,
551 PointD &pt3LongestSegment2,
552 PointD &pt4LongestSegment2)
const;
666 template<
typename TPo
intD>
668 const TPointD & ptC, PointD & ptProjected)
const;
682 template<
typename TConstIteratorG>
684 InputPoint & aFirstExtrPt, InputPoint & aLastExtrPt)
const;
699 template <
typename TInputPo
int,
typename TConstIterator>
701 operator<< ( std::ostream & out, const AlphaThickSegmentComputer<TInputPoint, TConstIterator> & object );
709 #if !defined(BUILD_INLINE) 710 #include "DGtal/geometry/curves/AlphaThickSegmentComputer.ih" 717 #endif // !defined AlphaThickSegmentComputer_h 719 #undef AlphaThickSegmentComputer_RECURSES 720 #endif // else defined(AlphaThickSegmentComputer_RECURSES)
AlphaThickSegmentComputer(const double maximalThickness=1.0, const ThicknessDef &thicknessDefinition=functions::Hull2D::HorizontalVerticalThickness, const double thickCompPrecision=1e-6)
void init(const ConstIterator &it)
void getBoundingBox(PointD &pt1LongestSegment1, PointD &pt2LongestSegment1, PointD &pt3LongestSegment2, PointD &pt4LongestSegment2) const
unsigned int getNumberSegmentPoints() const
std::deque< Point >::const_iterator ConstIterator
BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator< TConstIterator >))
TConstIterator ConstIterator
double updateMainHeightAndAntiPodal()
double getSegmentLength() const
Aim: A parallel strip in the space is the intersection of two parallel half-planes such that each hal...
std::vector< InputPoint > InputPointContainer
DGtal::InHalfPlaneBySimple3x3Matrix< InputPoint, typename InputPoint::Component > Functor
std::pair< InputPoint, InputPoint > getExtremityPoints() const
~AlphaThickSegmentComputer()
ThicknessDefinition
The 2 thickness definitions.
double myMaximalThickness
ContainerConstIterator containerEnd() const
std::vector< InputPoint > getConvexHull() const
void selfDisplay(std::ostream &out) const
Reverse getReverse() const
bool isStoringSegmentPoints() const
Aim: This class implements the on-line algorithm of Melkman for the computation of the convex hull of...
ThicknessDef myThicknessDefinition
DGtal::MelkmanConvexHull< InputPoint, Functor > melkmanCH
InputPointContainer::const_iterator ContainerConstIterator
ConvexhullConstIterator convexhullBegin() const
AlphaThickSegmentComputer & operator=(const AlphaThickSegmentComputer &other)
InputPointContainer::iterator Iterator
bool projectOnStraightLine(const TPointD &ptA, const TPointD &ptB, const TPointD &ptC, PointD &ptProjected) const
ConstIterator end() const
DGtal::MelkmanConvexHull< InputPoint, Functor >::ConstIterator ConvexhullConstIterator
unsigned int myNbPointsAddedFromIterators
DGtal is the top-level namespace which contains all DGtal functions and types.
void computeParallelStripParams(double &mu, PointD &N, double &nu) const
Primitive primitive() const
DGtal::functions::Hull2D::ThicknessDefinition ThicknessDef
DGtal::PointVector< 2, double > PointD
BOOST_STATIC_ASSERT((TInputPoint::dimension==2))
std::pair< std::pair< InputPoint, InputPoint >, InputPoint > getAntipodalLeaningPoints() const
void computeExtremaPoints(const TConstIteratorG &itBegin, const TConstIteratorG &itEnd, InputPoint &aFirstExtrPt, InputPoint &aLastExtrPt) const
ParallelStrip< SpaceND< 2, DGtal::int32_t >,true, true > Primitive
bool melkmanIsConvexValid()
ConstIterator begin() const
ConvexhullConstIterator convexhullEnd() const
AlphaThickSegmentComputer< InputPoint, ConstIterator > Self
bool operator==(const AlphaThickSegmentComputer &other) const
InputPointContainer myPointContainer
Aim: This class is devoted to the recognition of alpha thick segments as described in ...
double myThicknessCompPrecision
std::string className() const
bool operator!=(const AlphaThickSegmentComputer &other) const
ContainerConstIterator containerBegin() const
Aim: Class that implements an orientation functor, ie. it provides a way to compute the orientation o...
AlphaThickSegmentComputer< InputPoint, ReverseIterator< ConstIterator > > Reverse
InputPointContainer::size_type Size
void getBoundingBoxFromExtremPoints(const InputPoint &aFirstPt, const InputPoint &aLastPt, PointD &pt1LongestSegment1, PointD &pt2LongestSegment1, PointD &pt3LongestSegment2, PointD &pt4LongestSegment2, double minVisibleWidthBounds=0.2) const
double getThickness() const