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 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::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

Definition at line 162 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 167 of file FunctorsLambdaMST.h.


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

Definition at line 168 of file FunctorsLambdaMST.h.

Member Function Documentation


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

◆ operator()()

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

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

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

Definition at line 190 of file FunctorsLambdaMST.h.

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

191  {
192  Value result;
193  typename DSS::Point3d directionZ3;
194  RealVector direction;
195  typename DSS::PointR3d intercept;
196  typename DSS::PointR3d thikness;
198  aDSS.getParameters ( directionZ3, intercept, thikness );
199  direction[0] = directionZ3[0];
200  direction[1] = directionZ3[1];
201  direction[2] = directionZ3[2];
203  result.second = lambdaFunctor ( (double)indexOfPointInDSS / (double)dssLen );
205  double norm = direction.norm();
206  if ( norm != 0. )
207  direction /= norm;
208  result.first = direction * result.second;
209  return result;
210  }
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:141
double norm(const NormType type=L_2) const

Field Documentation

◆ lambdaFunctor

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

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