DGtal  0.9.3beta
Public Types | Public Member Functions | Protected Member Functions | Private Attributes
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor > Class Template Reference

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

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

Public Types

typedef TSegmentation Segmentation
 
typedef TSegmentation::SegmentComputer SegmentComputer
 
typedef SegmentComputer::ConstIterator ConstIterator
 
typedef Functor::Value Value
 
typedef TSpace::RealVector RealVector
 
typedef TSpace::Point Point
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
 BOOST_STATIC_ASSERT ((TSpace::dimension==3))
 
 BOOST_CONCEPT_ASSERT ((concepts::CLMSTTangentFromDSS< Functor >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CForwardSegmentComputer< typename TSegmentation::SegmentComputer >))
 
 LambdaMST3DEstimator ()
 
void init (const ConstIterator &itb, const ConstIterator &ite)
 
void attach (Alias< TSegmentation > segmentComputer)
 
bool isValid () const
 
RealVector eval (const ConstIterator &it)
 
template<typename OutputIterator >
OutputIterator eval (const ConstIterator &itb, const ConstIterator &ite, OutputIterator result)
 

Protected Member Functions

template<typename OutputIterator >
void accumulate (std::multimap< Point, Value > &outValues, const ConstIterator &itb, const ConstIterator &ite, OutputIterator &result)
 

Private Attributes

ConstIterator myBegin
 
ConstIterator myEnd
 
TSegmentation * dssSegments
 
Functor myFunctor
 

Detailed Description

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

Aim: Implement 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 59 of file LambdaMST3D.h.

Member Typedef Documentation

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

Type of iterator, at least readable and forward.

Definition at line 74 of file LambdaMST3D.h.

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

Type of 3d real point.

Definition at line 80 of file LambdaMST3D.h.

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

Type of 3d real vector.

Definition at line 78 of file LambdaMST3D.h.

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

Tangential cover algorithm.

Definition at line 70 of file LambdaMST3D.h.

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

Curve segmentation algorithm.

Definition at line 72 of file LambdaMST3D.h.

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

Type returned by model of CLMSTTangentFrom2DSS.

Definition at line 76 of file LambdaMST3D.h.

Constructor & Destructor Documentation

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

Default constructor.

Member Function Documentation

template<typename TSpace, typename TSegmentation, typename Functor>
template<typename OutputIterator >
void DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::accumulate ( std::multimap< Point, Value > &  outValues,
const ConstIterator itb,
const ConstIterator ite,
OutputIterator &  result 
)
protected

Accumulate partial results obtained for each point. In 3D it can happen that DSSs' direction vectors over same point are opposite. To avoid this problem we measure angle between segments' direction vectors and if this angle is bigger than \(\pi/2\), then one of the vectors is reversed. Finally, tangent direction is estimated and stored.

Template Parameters
OutputIteratorwritable iterator.
Parameters
outValuespartial results for each point
itbbegin iterator
iteend iterator
resultwritable iterator over a container which stores estimated tangent directions.
template<typename TSpace, typename TSegmentation, typename Functor>
void DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::attach ( Alias< TSegmentation >  segmentComputer)
Parameters
segmentComputer- DSS segmentation algorithm
template<typename TSpace, typename TSegmentation, typename Functor>
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
template<typename TSpace, typename TSegmentation, typename Functor>
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::BOOST_CONCEPT_ASSERT ( (concepts::CLMSTTangentFromDSS< Functor >)  )
template<typename TSpace, typename TSegmentation, typename Functor>
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::BOOST_CONCEPT_ASSERT ( (concepts::CForwardSegmentComputer< typename TSegmentation::SegmentComputer >)  )
template<typename TSpace, typename TSegmentation, typename Functor>
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::BOOST_STATIC_ASSERT ( (TSpace::dimension==3)  )
template<typename TSpace, typename TSegmentation, typename Functor>
RealVector DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::eval ( const ConstIterator it)
Parameters
itConstIterator defined over the underlying curve
Returns
tangent direction
template<typename TSpace, typename TSegmentation, typename Functor>
template<typename OutputIterator >
OutputIterator DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::eval ( const ConstIterator itb,
const 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.
template<typename TSpace, typename TSegmentation, typename Functor>
void DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::init ( const ConstIterator itb,
const ConstIterator ite 
)

Initialization.

Parameters
itbbegin iterator
iteend iterator
template<typename TSpace, typename TSegmentation, typename Functor>
bool DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor >::isValid ( ) const

Checks the validity/consistency of the object.

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

Field Documentation

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

Pointer to a curve segmentation algorithm.

Definition at line 154 of file LambdaMST3D.h.

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

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

Definition at line 146 of file LambdaMST3D.h.

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

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

Definition at line 150 of file LambdaMST3D.h.

template<typename TSpace, typename TSegmentation, typename Functor>
Functor DGtal::LambdaMST3DEstimator< 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 160 of file LambdaMST3D.h.


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