DGtal  0.9.4beta
Data Structures | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::TangentFromDSS2DFunctor< DSS, LambdaFunction > Class Template Reference

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

Data Structures

struct  Value
 

Public Types

typedef PointVector< 2, double > RealVector
 
typedef DSS TDSS
 

Public Member Functions

Value operator() (const TDSS &aDSS, const int &indexOfPointInDSS, const 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::TangentFromDSS2DFunctor< DSS, LambdaFunction >

Description of class 'TangentFromDSS2DFunctor' – 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 109 of file FunctorsLambdaMST.h.

Member Typedef Documentation

template<typename DSS, typename LambdaFunction>
typedef PointVector<2, double> DGtal::TangentFromDSS2DFunctor< DSS, LambdaFunction >::RealVector

Definition at line 114 of file FunctorsLambdaMST.h.

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

Definition at line 115 of file FunctorsLambdaMST.h.

Member Function Documentation

template<typename DSS, typename LambdaFunction>
DGtal::TangentFromDSS2DFunctor< DSS, LambdaFunction >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< LambdaFunction, double, double >)  )
private
template<typename DSS, typename LambdaFunction>
Value DGtal::TangentFromDSS2DFunctor< DSS, LambdaFunction >::operator() ( const TDSS aDSS,
const int &  indexOfPointInDSS,
const 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 140 of file FunctorsLambdaMST.h.

References DGtal::TangentFromDSS2DFunctor< DSS, LambdaFunction >::Value::first, DGtal::TangentFromDSS2DFunctor< DSS, LambdaFunction >::lambdaFunctor, and DGtal::TangentFromDSS2DFunctor< DSS, LambdaFunction >::Value::second.

141  {
142  Value result;
143  double norm = std::sqrt ( aDSS.a() * aDSS.a() + aDSS.b() * aDSS.b() );
144  result.second = lambdaFunctor ( (double)indexOfPointInDSS / (double)dssLen );
145  result.first[0] = result.second * aDSS.b () / norm;
146  result.first[1] = result.second * aDSS.a () / norm;
147  return result;
148  }

Field Documentation

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

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