DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
LocalConvolutionNormalVectorEstimator.h
1 
17 #pragma once
18 
31 #if defined(LocalConvolutionNormalVectorEstimator_RECURSES)
32 #error Recursive header files inclusion detected in LocalConvolutionNormalVectorEstimator.h
33 #else // defined(LocalConvolutionNormalVectorEstimator_RECURSES)
34 
35 #define LocalConvolutionNormalVectorEstimator_RECURSES
36 
37 #if !defined LocalConvolutionNormalVectorEstimator_h
38 
39 #define LocalConvolutionNormalVectorEstimator_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/PointVector.h"
46 #include "DGtal/base/CountedPtr.h"
47 #include "DGtal/topology/BreadthFirstVisitor.h"
48 #include "DGtal/topology/DigitalSurface.h"
49 #include "DGtal/geometry/surfaces/estimation/CConvolutionWeights.h"
51 
52 namespace DGtal
53 {
55  // template class LocalConvolutionNormalVectorEstimator
77  template <typename TDigitalSurface, typename TKernelFunctor>
79  {
80 
81  // ----------------------- Types ------------------------------
82  public:
83 
84  typedef TDigitalSurface DigitalSurface;
85  typedef TKernelFunctor KernelFunctor;
87  typedef typename Surface::ConstIterator ConstIterator;
88  typedef typename Surface::KSpace::Space::RealVector Quantity;
89  typedef typename Surface::SCell SCell;
90 
92 
93  // ----------------------- Standard services ------------------------------
94  public:
95 
102  const KernelFunctor & aFunctor);
103 
108 
109  // ----------------------- Interface --------------------------------------
110  public:
111 
113  const Surface & surface() const;
114 
121  void init(const double h,
122  const unsigned int radius);
123 
128  Quantity eval(const SCell & scell) const;
129 
133  Quantity eval(const ConstIterator& it) const;
134 
139  template <typename OutputIterator>
140  OutputIterator eval(const ConstIterator& itb,
141  const ConstIterator& ite,
142  OutputIterator result) const;
143 
149  template <typename OutputIterator>
150  OutputIterator evalAll( OutputIterator result ) const;
151 
152 
157  bool isValid() const;
158 
159  // ------------------------- Protected Datas ------------------------------
160  protected:
165  {
166  myFlagIsInit = false;
167  }
168 
169 
170  // ------------------------- Private Datas --------------------------------
171  private:
172 
174  double myH;
175 
178 
180  unsigned int myRadius;
181 
184 
187 
188  // ------------------------- Hidden services ------------------------------
189  private:
190 
197 
205 
206 
207  }; // end of class LocalConvolutionNormalVectorEstimator
208 
209 } // namespace DGtal
210 
211 
213 // Includes inline functions.
214 #include "DGtal/geometry/surfaces/estimation/LocalConvolutionNormalVectorEstimator.ih"
215 
216 // //
218 
219 #endif // !defined LocalConvolutionNormalVectorEstimator_h
220 
221 #undef LocalConvolutionNormalVectorEstimator_RECURSES
222 #endif // else defined(LocalConvolutionNormalVectorEstimator_RECURSES)