DGtal  0.9.3beta
Public Types | Public Member Functions
DGtal::detail::TangentAngleFromDSS Struct Reference

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

Public Types

typedef double Value

Public Member Functions

template<typename DSS >
Value operator() (const DSS &aDSS) const

Detailed Description

Description of class 'TangentAngleFromDSS'

Aim: computes the tangent orientation of a DSS (angle in [-pi,+pi] radians between the tangent and the x-axis).

Definition at line 682 of file SegmentComputerEstimators.h.

Member Typedef Documentation

Definition at line 685 of file SegmentComputerEstimators.h.

Member Function Documentation

template<typename DSS >
Value DGtal::detail::TangentAngleFromDSS::operator() ( const DSS &  aDSS) const


the angle of type double (angle in [-pi,+pi] radians between the tangent and the x-axis).
aDSSan instance of segment computer devoted to the DSS recognition.
Template Parameters
DSSa model of segment computer, which must have methods a() and b() returning the y- and x-component of the tangent vector.

Definition at line 702 of file SegmentComputerEstimators.h.

703  {
704  Value a = (Value) NumberTraits<typename DSS::Integer>
705  ::castToDouble(aDSS.a());
706  Value b = (Value) NumberTraits<typename DSS::Integer>
707  ::castToDouble(aDSS.b());
709  return std::atan2(a,b);
710  }

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