DGtal 1.3.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::TangentFromDSS3DFunctor< DSS, LambdaFunction > Class Template Reference

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

Data Structures

struct  Value
 

Public Types

typedef PointVector< 3, double > RealVector
 
typedef DSS TDSS
 

Public Member Functions

Value operator() (const TDSS &aDSS, const unsigned int indexOfPointInDSS, const unsigned int dssLen) const
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< LambdaFunction, double, double >))
 

Private Attributes

LambdaFunction lambdaFunctor
 

Detailed Description

template<typename DSS, typename LambdaFunction>
class DGtal::TangentFromDSS3DFunctor< DSS, LambdaFunction >

Description of class 'TangentFromDSS3DFunctor' – model of CLMSTTangentFromDSS. Aim: Provide a functor which calculate from digital straight segment its direction and eccentricity around a given point.

Template Parameters
DSSdigital straight segment recognition algorithm
LambdaFunctionmodel of CLambdaFunctor
See also
CLambdaFunctor.h

Definition at line 173 of file FunctorsLambdaMST.h.

Member Typedef Documentation

◆ RealVector

template<typename DSS , typename LambdaFunction >
typedef PointVector<3, double> DGtal::TangentFromDSS3DFunctor< DSS, LambdaFunction >::RealVector

Definition at line 178 of file FunctorsLambdaMST.h.

◆ TDSS

template<typename DSS , typename LambdaFunction >
typedef DSS DGtal::TangentFromDSS3DFunctor< DSS, LambdaFunction >::TDSS

Definition at line 179 of file FunctorsLambdaMST.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename DSS , typename LambdaFunction >
DGtal::TangentFromDSS3DFunctor< DSS, LambdaFunction >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< LambdaFunction, double, double >)  )
private

◆ operator()()

template<typename DSS , typename LambdaFunction >
Value DGtal::TangentFromDSS3DFunctor< DSS, LambdaFunction >::operator() ( const TDSS aDSS,
const unsigned int  indexOfPointInDSS,
const unsigned int  dssLen 
) const
inline

Calculate a direction of the 2D DSS and an eccentricity of a given point in this DSS.

Parameters
aDSSdigital straight segment
indexOfPointInDSSindex of given point in aDSS
dssLenlength of aDSS

Definition at line 201 of file FunctorsLambdaMST.h.

202 {
203 Value result;
204 typename DSS::Point3d directionZ3;
205 RealVector direction;
206 typename DSS::PointR3d intercept;
207 typename DSS::PointR3d thikness;
208
209 aDSS.getParameters ( directionZ3, intercept, thikness );
210 direction[0] = directionZ3[0];
211 direction[1] = directionZ3[1];
212 direction[2] = directionZ3[2];
213
214 result.second = lambdaFunctor ( (double)indexOfPointInDSS / (double)dssLen );
215
216 double norm = direction.norm();
217 if ( norm != 0. )
218 direction /= norm;
219 result.first = direction * result.second;
220 return result;
221 }

References DGtal::TangentFromDSS3DFunctor< DSS, LambdaFunction >::lambdaFunctor, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm().

Field Documentation

◆ lambdaFunctor

template<typename DSS , typename LambdaFunction >
LambdaFunction DGtal::TangentFromDSS3DFunctor< DSS, LambdaFunction >::lambdaFunctor
private

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