DGtal  0.9.2
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/base/ConstAlias.h"
46 #include "DGtal/kernel/PointVector.h"
47 #include "DGtal/base/CountedPtr.h"
48 #include "DGtal/graph/BreadthFirstVisitor.h"
49 #include "DGtal/topology/DigitalSurface.h"
50 #include "DGtal/geometry/surfaces/estimation/CConvolutionWeights.h"
52 
53 namespace DGtal
54 {
55  namespace deprecated
56  {
57 
59  // template class LocalConvolutionNormalVectorEstimator
84  template <typename TDigitalSurface, typename TKernelFunctor>
86  {
87 
88  // ----------------------- Types ------------------------------
89  public:
90 
91  typedef TDigitalSurface DigitalSurface;
92  typedef TKernelFunctor KernelFunctor;
93  typedef DigitalSurface Surface;
94  typedef typename Surface::ConstIterator ConstIterator;
95  typedef typename Surface::KSpace::Space::RealVector Quantity;
96  typedef typename Surface::SCell SCell;
97 
99 
100  // ----------------------- Standard services ------------------------------
101  public:
102 
109  ConstAlias<KernelFunctor> aFunctor);
110 
115 
116  // ----------------------- Interface --------------------------------------
117  public:
118 
120  const Surface & surface() const;
121 
128  void init(const double h,
129  const unsigned int radius);
130 
135  Quantity eval(const SCell & scell) const;
136 
140  Quantity eval(const ConstIterator& it) const;
141 
146  template <typename OutputIterator>
147  OutputIterator eval(const ConstIterator& itb,
148  const ConstIterator& ite,
149  OutputIterator result) const;
150 
156  template <typename OutputIterator>
157  OutputIterator evalAll( OutputIterator result ) const;
158 
159 
164  bool isValid() const;
165 
166  // ------------------------- Protected Datas ------------------------------
167  protected:
172  {
173  myFlagIsInit = false;
174  }
175 
176 
177  // ------------------------- Private Datas --------------------------------
178  private:
179 
181  double myH;
182 
185 
187  unsigned int myRadius;
188 
190  const DigitalSurface & mySurface;
191 
193  const KernelFunctor & myKernelFunctor;
194 
195  // ------------------------- Hidden services ------------------------------
196  private:
197 
204 
212 
213 
214  }; // end of class LocalConvolutionNormalVectorEstimator
215  }
216 } // namespace DGtal
217 
218 
220 // Includes inline functions.
221 #include "DGtal/geometry/surfaces/estimation/LocalConvolutionNormalVectorEstimator.ih"
222 
223 // //
225 
226 #endif // !defined LocalConvolutionNormalVectorEstimator_h
227 
228 #undef LocalConvolutionNormalVectorEstimator_RECURSES
229 #endif // else defined(LocalConvolutionNormalVectorEstimator_RECURSES)
Aim: Computes the normal vector at a surface element by convolution of elementary normal vector to ad...
OutputIterator evalAll(OutputIterator result) const
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
BOOST_CONCEPT_ASSERT((concepts::CConvolutionWeights< TKernelFunctor >))
DGtal is the top-level namespace which contains all DGtal functions and types.
const KernelFunctor & myKernelFunctor
Reference of the kernel convolution functor.
LocalConvolutionNormalVectorEstimator & operator=(const LocalConvolutionNormalVectorEstimator &other)
const DigitalSurface & mySurface
Reference to the digital surface.
void init(const double h, const unsigned int radius)
Aim: defines models of centered convolution kernel used for normal vector integration for instance...