DGtal  1.5.beta
DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor > Class Template Reference

#include <DGtal/geometry/curves/estimation/LambdaMST2D.h>

Inheritance diagram for DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >:
[legend]

Public Types

typedef TSegmentation Segmentation
 Tangential cover algorithm. More...
 
typedef TSegmentation::SegmentComputer SegmentComputer
 Curve segmentation algorithm. More...
 
typedef SegmentComputer::ConstIterator ConstIterator
 Type of iterator, at least readable and forward. More...
 
typedef Functor::Value Value
 Type returned by model of CLMSTTangentFrom2DSS. More...
 
typedef TSpace::RealVector RealVector
 Type of 3d real vector. More...
 
typedef TSpace::Point Point
 Type of 3d real point. More...
 

Public Member Functions

 LambdaMST2DEstimator ()
 Default constructor. More...
 
void init (ConstIterator itb, ConstIterator ite)
 
void attach (Alias< TSegmentation > SegmentComputer)
 
RealVector eval (const Point &p)
 
template<typename OutputIterator >
OutputIterator eval (ConstIterator itb, ConstIterator ite, OutputIterator result)
 
bool isValid () const
 

Protected Member Functions

template<typename OutputIterator >
void accumulate (std::vector< Value > &outValues, OutputIterator &result)
 Accumulate partial results obtained for each point. More...
 

Private Member Functions

 BOOST_STATIC_ASSERT ((TSpace::dimension==2))
 
 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CLMSTTangentFromDSS< Functor >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CForwardSegmentComputer< typename TSegmentation::SegmentComputer >))
 

Private Attributes

ConstIterator myBegin
 
ConstIterator myEnd
 
Functor myFunctor
 
TSegmentation * dssSegments
 

Detailed Description

template<typename TSpace, typename TSegmentation, typename Functor>
class DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >

Aim: Implementation of Lambda MST tangent estimators. This class is a model of CCurveLocalGeometricEstimator.

Template Parameters
TSpacemodel of CSpace
TSegmentationtangential cover obtained by a segmentation of a 2D digital curve by maximal straight segments
Functormodel of CLMSTTangentFrom2DSS

Definition at line 57 of file LambdaMST2D.h.

Member Typedef Documentation

◆ ConstIterator

template<typename TSpace , typename TSegmentation , typename Functor >
typedef SegmentComputer::ConstIterator DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::ConstIterator

Type of iterator, at least readable and forward.

Definition at line 71 of file LambdaMST2D.h.

◆ Point

template<typename TSpace , typename TSegmentation , typename Functor >
typedef TSpace::Point DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::Point

Type of 3d real point.

Definition at line 77 of file LambdaMST2D.h.

◆ RealVector

template<typename TSpace , typename TSegmentation , typename Functor >
typedef TSpace::RealVector DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::RealVector

Type of 3d real vector.

Definition at line 75 of file LambdaMST2D.h.

◆ Segmentation

template<typename TSpace , typename TSegmentation , typename Functor >
typedef TSegmentation DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::Segmentation

Tangential cover algorithm.

Definition at line 67 of file LambdaMST2D.h.

◆ SegmentComputer

template<typename TSpace , typename TSegmentation , typename Functor >
typedef TSegmentation::SegmentComputer DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::SegmentComputer

Curve segmentation algorithm.

Definition at line 69 of file LambdaMST2D.h.

◆ Value

template<typename TSpace , typename TSegmentation , typename Functor >
typedef Functor::Value DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::Value

Type returned by model of CLMSTTangentFrom2DSS.

Definition at line 73 of file LambdaMST2D.h.

Constructor & Destructor Documentation

◆ LambdaMST2DEstimator()

template<typename TSpace , typename TSegmentation , typename Functor >
DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::LambdaMST2DEstimator ( )

Default constructor.

Member Function Documentation

◆ accumulate()

template<typename TSpace , typename TSegmentation , typename Functor >
template<typename OutputIterator >
void DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::accumulate ( std::vector< Value > &  outValues,
OutputIterator &  result 
)
protected

Accumulate partial results obtained for each point.

Template Parameters
OutputIteratorwritable iterator.
Parameters
outValuespartial results for each point
resultwritable iterator over a container which stores estimated tangent directions.

◆ attach()

template<typename TSpace , typename TSegmentation , typename Functor >
void DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::attach ( Alias< TSegmentation >  SegmentComputer)

Attach tangential cover computer.

Parameters
SegmentComputer- DSS segmentation algorithm

Referenced by main().

◆ BOOST_CONCEPT_ASSERT() [1/3]

template<typename TSpace , typename TSegmentation , typename Functor >
DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::BOOST_CONCEPT_ASSERT ( (concepts::CForwardSegmentComputer< typename TSegmentation::SegmentComputer >)  )
private

◆ BOOST_CONCEPT_ASSERT() [2/3]

template<typename TSpace , typename TSegmentation , typename Functor >
DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::BOOST_CONCEPT_ASSERT ( (concepts::CLMSTTangentFromDSS< Functor >)  )
private

◆ BOOST_CONCEPT_ASSERT() [3/3]

template<typename TSpace , typename TSegmentation , typename Functor >
DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
private

◆ BOOST_STATIC_ASSERT()

template<typename TSpace , typename TSegmentation , typename Functor >
DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::BOOST_STATIC_ASSERT ( (TSpace::dimension==2)  )
private

◆ eval() [1/2]

template<typename TSpace , typename TSegmentation , typename Functor >
RealVector DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::eval ( const Point p)
Parameters
pa point of the underlying curve
Returns
tangent direction

Referenced by main().

◆ eval() [2/2]

template<typename TSpace , typename TSegmentation , typename Functor >
template<typename OutputIterator >
OutputIterator DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::eval ( ConstIterator  itb,
ConstIterator  ite,
OutputIterator  result 
)
Template Parameters
OutputIteratorwritable iterator. More efficient way to compute tangent directions for all points of a curve.
Parameters
itbbegin iterator
iteend iterator
resultwritable iterator over a container which stores estimated tangent directions.

◆ init()

template<typename TSpace , typename TSegmentation , typename Functor >
void DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::init ( ConstIterator  itb,
ConstIterator  ite 
)

Initialization.

Parameters
itbbegin iterator
iteend iterator

Referenced by main().

◆ isValid()

template<typename TSpace , typename TSegmentation , typename Functor >
bool DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::isValid ( ) const

Checks the validity/consistency of the object.

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

Field Documentation

◆ dssSegments

template<typename TSpace , typename TSegmentation , typename Functor >
TSegmentation* DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::dssSegments
private

Pointer to a curve segmentation algorithm.

Definition at line 154 of file LambdaMST2D.h.

◆ myBegin

template<typename TSpace , typename TSegmentation , typename Functor >
ConstIterator DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::myBegin
private

Iterator which corresponds to the beginning of a valid range - [myBegin, myEnd)

Definition at line 140 of file LambdaMST2D.h.

◆ myEnd

template<typename TSpace , typename TSegmentation , typename Functor >
ConstIterator DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::myEnd
private

Iterator which corresponds to the end of a valid range - [myBegin, myEnd)

Definition at line 144 of file LambdaMST2D.h.

◆ myFunctor

template<typename TSpace , typename TSegmentation , typename Functor >
Functor DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::myFunctor
private

Functor which takes: reference to digital straight segment - DSS, position of given point in DSS and length of DSS and returns DSS's direction and the eccentricity of the point in the DSS.

Definition at line 150 of file LambdaMST2D.h.


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