DGtal  1.3.beta
TwoStepLocalLengthEstimator.h
1 
17 #pragma once
18 
33 #if defined(TwoStepLocalLengthEstimator_RECURSES)
34 #error Recursive header files inclusion detected in TwoStepLocalLengthEstimator.h
35 #else // defined(TwoStepLocalLengthEstimator_RECURSES)
36 
37 #define TwoStepLocalLengthEstimator_RECURSES
38 
39 #if !defined TwoStepLocalLengthEstimator_h
40 
41 #define TwoStepLocalLengthEstimator_h
42 
44 // Inclusions
45 #include <iostream>
46 #include "DGtal/base/Common.h"
48 
49 namespace DGtal
50 {
51 
53  // template class TwoStepLocalLengthEstimator
64  template <typename TConstIterator>
66  {
67  // ----------------------- Standard services ------------------------------
68  public:
69 
70 
72  typedef TConstIterator ConstIterator;
73 
74  typedef double Quantity;
75 
79  TwoStepLocalLengthEstimator() = delete;
80 
86  TwoStepLocalLengthEstimator(const double wdirect, const double wdiag);
87 
91  ~TwoStepLocalLengthEstimator() = default;
92 
99 
107 
108  // ----------------------- Interface --------------------------------------
109  public:
110 
122  Quantity eval( const ConstIterator& itb,
123  const ConstIterator& ite,
124  const double h = 1. ) const;
125 
130  void selfDisplay ( std::ostream & out ) const;
131 
136  bool isValid() const;
137 
138  // ------------------------- Private Datas --------------------------------
139  private:
140 
144 
145  }; // end of class TwoStepLocalLengthEstimator
146 
147 
154  template <typename T>
155  std::ostream&
156  operator<< ( std::ostream & out, const TwoStepLocalLengthEstimator<T> & object );
157 
158 } // namespace DGtal
159 
160 
162 // Includes inline functions.
163 #include "DGtal/geometry/curves/estimation/TwoStepLocalLengthEstimator.ih"
164 
165 // //
167 
168 #endif // !defined TwoStepLocalLengthEstimator_h
169 
170 #undef TwoStepLocalLengthEstimator_RECURSES
171 #endif // else defined(TwoStepLocalLengthEstimator_RECURSES)
DGtal::TwoStepLocalLengthEstimator
Aim: a simple model of CGlobalCurveEstimator that compute the length of a curve using the l_1 metric ...
Definition: TwoStepLocalLengthEstimator.h:65
DGtal::TwoStepLocalLengthEstimator::ConstIterator
TConstIterator ConstIterator
Definition: TwoStepLocalLengthEstimator.h:72
DGtal::TwoStepLocalLengthEstimator::~TwoStepLocalLengthEstimator
~TwoStepLocalLengthEstimator()=default
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::TwoStepLocalLengthEstimator::myWeightDiagonal
double myWeightDiagonal
Definition: TwoStepLocalLengthEstimator.h:143
DGtal::TwoStepLocalLengthEstimator::isValid
bool isValid() const
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::TwoStepLocalLengthEstimator::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::TwoStepLocalLengthEstimator::Quantity
double Quantity
Definition: TwoStepLocalLengthEstimator.h:74
DGtal::TwoStepLocalLengthEstimator::operator=
TwoStepLocalLengthEstimator & operator=(const TwoStepLocalLengthEstimator &other)=delete
DGtal::TwoStepLocalLengthEstimator::eval
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h=1.) const
DGtal::TwoStepLocalLengthEstimator::myWeightDirect
double myWeightDirect
Weights.
Definition: TwoStepLocalLengthEstimator.h:142
DGtal::TwoStepLocalLengthEstimator::TwoStepLocalLengthEstimator
TwoStepLocalLengthEstimator()=delete