DGtal 1.4.0
Loading...
Searching...
No Matches
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)
43#define DSSLengthEstimator_RECURSES
44
45#if !defined DSSLengthEstimator_h
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
59namespace 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
104
105
111 DSSLengthEstimator ( const DSSLengthEstimator & other ) = delete;
112
113
121
122
123 // ----------------------- Interface --------------------------------------
124 public:
125
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)
Aim: This class is a wrapper around ArithmeticalDSS that is devoted to the dynamic recognition of dig...
IteratorCirculatorTraits< ConstIterator >::Value Point
Aim: a model of CGlobalCurveEstimator that segments the digital curve into DSS and computes the lengt...
void selfDisplay(std::ostream &out) const
DSSLengthEstimator(const DSSLengthEstimator &other)=delete
BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIteratorConcept< TConstIterator >))
BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversalConcept< TConstIterator >))
DSSLengthEstimator & operator=(const DSSLengthEstimator &other)=delete
ArithmeticalDSSComputer< ConstIterator, int, 4 > DSSComputer
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h=1.) const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/ForwardTraversal.html.
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/ReadableIterator.html.