DGtal  1.3.beta
DSSLengthEstimator.h
1 
17 #pragma once
18 
39 #if defined(DSSLengthEstimator_RECURSES)
40 #error Recursive header files inclusion detected in DSSLengthEstimator.h
41 #else // defined(DSSLengthEstimator_RECURSES)
42 
43 #define DSSLengthEstimator_RECURSES
44 
45 #if !defined DSSLengthEstimator_h
46 
47 #define DSSLengthEstimator_h
48 
50 // Inclusions
51 #include <iostream>
52 #include "DGtal/base/Common.h"
53 //#include "DGtal/base/IteratorTraits.h"
54 #include "DGtal/geometry/curves/GreedySegmentation.h"
55 #include "DGtal/geometry/curves/ArithmeticalDSSComputer.h"
56 
58 
59 namespace DGtal
60 {
61 
63  // template class DSSLengthEstimator
75  template <typename TConstIterator>
77  {
80 
81  // ----------------------- Standard services ------------------------------
82  public:
83 
84 
86  typedef TConstIterator ConstIterator;
87 
88  typedef double Quantity;
89 
91  typedef typename DSSComputer::Point Point;
92  typedef typename DSSComputer::Vector Vector;
93 
97  DSSLengthEstimator() = default;
98 
99 
103  ~DSSLengthEstimator() = default;
104 
105 
111  DSSLengthEstimator ( const DSSLengthEstimator & other ) = delete;
112 
113 
120  DSSLengthEstimator & operator= ( const DSSLengthEstimator & other ) = delete;
121 
122 
123  // ----------------------- Interface --------------------------------------
124  public:
125 
135  Quantity eval( const ConstIterator& itb,
136  const ConstIterator& ite,
137  const double h = 1. ) const;
138 
143  void selfDisplay ( std::ostream & out ) const;
144 
149  bool isValid() const;
150 
151  }; // end of class DSSLengthEstimator
152 
153 
160  template <typename T>
161  std::ostream&
162  operator<< ( std::ostream & out, const DSSLengthEstimator<T> & object );
163 
164 } // namespace DGtal
165 
166 
168 // Includes inline functions.
169 #include "DGtal/geometry/curves/estimation/DSSLengthEstimator.ih"
170 
171 // //
173 
174 #endif // !defined DSSLengthEstimator_h
175 
176 #undef DSSLengthEstimator_RECURSES
177 #endif // else defined(DSSLengthEstimator_RECURSES)
DGtal::DSSLengthEstimator::Vector
DSSComputer::Vector Vector
Definition: DSSLengthEstimator.h:92
DGtal::DSSLengthEstimator::operator=
DSSLengthEstimator & operator=(const DSSLengthEstimator &other)=delete
DGtal::DSSLengthEstimator::Point
DSSComputer::Point Point
Definition: DSSLengthEstimator.h:91
DGtal::ArithmeticalDSSComputer
Aim: This class is a wrapper around ArithmeticalDSS that is devoted to the dynamic recognition of dig...
Definition: ArithmeticalDSSComputer.h:86
DGtal::DSSLengthEstimator::isValid
bool isValid() const
DGtal::DSSLengthEstimator::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::DSSLengthEstimator::Quantity
double Quantity
Definition: DSSLengthEstimator.h:88
DGtal::DSSLengthEstimator::DSSComputer
ArithmeticalDSSComputer< ConstIterator, int, 4 > DSSComputer
Definition: DSSLengthEstimator.h:90
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
boost_concepts::ForwardTraversalConcept
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/ForwardTraversal.html.
Definition: BoostConcepts.dox:47
DGtal::DSSLengthEstimator::~DSSLengthEstimator
~DSSLengthEstimator()=default
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::DSSLengthEstimator::ConstIterator
TConstIterator ConstIterator
Definition: DSSLengthEstimator.h:86
DGtal::DSSLengthEstimator
Aim: a model of CGlobalCurveEstimator that segments the digital curve into DSS and computes the lengt...
Definition: DSSLengthEstimator.h:76
DGtal::DSSLengthEstimator::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIteratorConcept< TConstIterator >))
DGtal::DSSLengthEstimator::eval
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h=1.) const
boost_concepts::ReadableIteratorConcept
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/ReadableIterator.html.
Definition: BoostConcepts.dox:29
DGtal::ArithmeticalDSSComputer::Vector
Point Vector
Definition: ArithmeticalDSSComputer.h:132
DGtal::DSSLengthEstimator::DSSLengthEstimator
DSSLengthEstimator()=default
DGtal::ArithmeticalDSSComputer::Point
IteratorCirculatorTraits< ConstIterator >::Value Point
Definition: ArithmeticalDSSComputer.h:102