DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter > Class Template Reference

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

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

Public Types

typedef TSegmentation Segmentation
 Tangential cover algorithm.
 
typedef TSegmentation::SegmentComputer SegmentComputer
 Curve segmentation algorithm.
 
typedef SegmentComputer::ConstIterator ConstIterator
 Type of iterator, at least readable and forward.
 
typedef Functor::Value Value
 Type returned by model of CLMSTTangentFrom2DSS.
 
typedef TSpace::RealVector RealVector
 Type of 3d real vector.
 
typedef TSpace::Point Point
 Type of 3d real 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::CLMSTDSSFilter< DSSFilter >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CForwardSegmentComputer< typename TSegmentation::SegmentComputer >))
 
 LambdaMST3DEstimator ()
 Default constructor.
 
void init (ConstIterator itb, ConstIterator ite)
 
void attach (Alias< TSegmentation > segmentComputer)
 
bool isValid () const
 
RealVector eval (const Point &p)
 
template<typename OutputIterator >
OutputIterator eval (ConstIterator itb, ConstIterator ite, OutputIterator result)
 
DSSFilter & getDSSFilter ()
 

Protected Types

typedef std::vector< SegmentComputer >::const_iterator OrphanDSSIterator
 

Protected Member Functions

template<typename OutputIterator >
void accumulate (std::multimap< Point, Value > &outValues, ConstIterator itb, ConstIterator ite, OutputIterator &result)
 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.
 
Value treatOrphan (OrphanDSSIterator begin, OrphanDSSIterator end, const Point &p)
 Use the DSS filter defined conditions to ensure estimation over not covered points - orphans.
 
template<typename DSSesIterator , typename OrphanIterator >
void treatOrphans (DSSesIterator begin, DSSesIterator end, OrphanIterator obegin, OrphanIterator oend, std::multimap< Point, Value > &outValues)
 

Private Attributes

ConstIterator myBegin
 
ConstIterator myEnd
 
TSegmentation * dssSegments
 
Functor myFunctor
 
DSSFilter myDSSFilter
 

Detailed Description

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

Aim: Implement 3D 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
DSSFiltera functor used for filtering out DSSes which do not fullfil a given condition e.g., they are too short

Definition at line 62 of file LambdaMST3D.h.

Member Typedef Documentation

◆ ConstIterator

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

Type of iterator, at least readable and forward.

Definition at line 78 of file LambdaMST3D.h.

◆ OrphanDSSIterator

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
typedef std::vector<SegmentComputer>::const_iterator DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::OrphanDSSIterator
protected

Definition at line 140 of file LambdaMST3D.h.

◆ Point

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

Type of 3d real point.

Definition at line 84 of file LambdaMST3D.h.

◆ RealVector

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

Type of 3d real vector.

Definition at line 82 of file LambdaMST3D.h.

◆ Segmentation

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

Tangential cover algorithm.

Definition at line 74 of file LambdaMST3D.h.

◆ SegmentComputer

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

Curve segmentation algorithm.

Definition at line 76 of file LambdaMST3D.h.

◆ Value

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

Type returned by model of CLMSTTangentFrom2DSS.

Definition at line 80 of file LambdaMST3D.h.

Constructor & Destructor Documentation

◆ LambdaMST3DEstimator()

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

Default constructor.

Member Function Documentation

◆ accumulate()

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
template<typename OutputIterator >
void DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::accumulate ( std::multimap< Point, Value > & outValues,
ConstIterator itb,
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.

◆ attach()

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
void DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::attach ( Alias< TSegmentation > segmentComputer)
Parameters
segmentComputer- DSS segmentation algorithm
Examples
geometry/curves/estimation/exampleLMST3D.cpp.

Referenced by main().

◆ BOOST_CONCEPT_ASSERT() [1/4]

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

◆ BOOST_CONCEPT_ASSERT() [2/4]

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_CONCEPT_ASSERT ( (concepts::CLMSTDSSFilter< DSSFilter >) )

◆ BOOST_CONCEPT_ASSERT() [3/4]

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_CONCEPT_ASSERT ( (concepts::CLMSTTangentFromDSS< Functor >) )

◆ BOOST_CONCEPT_ASSERT() [4/4]

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >) )

◆ BOOST_STATIC_ASSERT()

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_STATIC_ASSERT ( (TSpace::dimension==3) )

◆ eval() [1/2]

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
RealVector DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::eval ( const Point & p)

For ranges of points the second version of this method is faster than iterating over this version.

NOTE THAT ONLY THIS VERSION ALLOWS FOR DSS FILTRATION!

Parameters
pa point of the underlying curve
Returns
tangent direction
Examples
geometry/curves/estimation/exampleLMST3D.cpp.

Referenced by main().

◆ eval() [2/2]

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
template<typename OutputIterator >
OutputIterator DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::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.

◆ getDSSFilter()

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
DSSFilter & DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::getDSSFilter ( )
Returns
the internal dss filter
Examples
geometry/curves/estimation/exampleLMST3D.cpp.

Referenced by main().

◆ init()

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

Initialization.

Parameters
itbbegin iterator
iteend iterator
Examples
geometry/curves/estimation/exampleLMST3D.cpp.

Referenced by main().

◆ isValid()

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

Checks the validity/consistency of the object.

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

◆ treatOrphan()

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
Value DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::treatOrphan ( OrphanDSSIterator begin,
OrphanDSSIterator end,
const Point & p )
protected

Use the DSS filter defined conditions to ensure estimation over not covered points - orphans.

Parameters
beginbegin iterator
endend iterator
pa point of the underlying curve
Returns
estimated tangent

◆ treatOrphans()

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
template<typename DSSesIterator , typename OrphanIterator >
void DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::treatOrphans ( DSSesIterator begin,
DSSesIterator end,
OrphanIterator obegin,
OrphanIterator oend,
std::multimap< Point, Value > & outValues )
protected

Field Documentation

◆ dssSegments

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

Pointer to a curve segmentation algorithm.

Definition at line 186 of file LambdaMST3D.h.

◆ myBegin

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

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

Definition at line 178 of file LambdaMST3D.h.

◆ myDSSFilter

template<typename TSpace , typename TSegmentation , typename Functor , typename DSSFilter >
DSSFilter DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::myDSSFilter
private

Definition at line 194 of file LambdaMST3D.h.

◆ myEnd

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

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

Definition at line 182 of file LambdaMST3D.h.

◆ myFunctor

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


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