DGtal  1.5.beta
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)
35 #define LocalConvolutionNormalVectorEstimator_RECURSES
36 
37 #if !defined LocalConvolutionNormalVectorEstimator_h
39 #define LocalConvolutionNormalVectorEstimator_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/ConstAlias.h"
45 #include "DGtal/kernel/PointVector.h"
46 #include "DGtal/base/CountedPtr.h"
47 #include "DGtal/graph/BreadthFirstVisitor.h"
48 #include "DGtal/topology/DigitalSurface.h"
49 #include "DGtal/geometry/surfaces/estimation/CConvolutionWeights.h"
51 
52 namespace DGtal
53 {
54  namespace deprecated
55  {
56 
58  // template class LocalConvolutionNormalVectorEstimator
83  template <typename TDigitalSurface, typename TKernelFunctor>
85  {
86 
87  // ----------------------- Types ------------------------------
88  public:
89 
90  typedef TDigitalSurface DigitalSurface;
91  typedef TKernelFunctor KernelFunctor;
95  typedef typename Surface::SCell SCell;
96 
98 
99  // ----------------------- Standard services ------------------------------
100  public:
101 
108  ConstAlias<KernelFunctor> aFunctor);
109 
114 
115  // ----------------------- Interface --------------------------------------
116  public:
117 
119  const Surface & surface() const;
120 
127  void init(const double h,
128  const unsigned int radius);
129 
134  Quantity eval(const SCell & scell) const;
135 
139  Quantity eval(const ConstIterator& it) const;
140 
145  template <typename OutputIterator>
146  OutputIterator eval(const ConstIterator& itb,
147  const ConstIterator& ite,
148  OutputIterator result) const;
149 
155  template <typename OutputIterator>
156  OutputIterator evalAll( OutputIterator result ) const;
157 
158 
163  bool isValid() const;
164 
165  // ------------------------- Protected Datas ------------------------------
166  protected:
171  {
172  myFlagIsInit = false;
173  }
174 
175 
176  // ------------------------- Private Datas --------------------------------
177  private:
178 
180  double myH;
181 
184 
186  unsigned int myRadius;
187 
190 
193 
194  // ------------------------- Hidden services ------------------------------
195  private:
196 
203 
211 
212 
213  }; // end of class LocalConvolutionNormalVectorEstimator
214  }
215 } // namespace DGtal
216 
217 
219 // Includes inline functions.
220 #include "DGtal/geometry/surfaces/estimation/LocalConvolutionNormalVectorEstimator.ih"
221 
222 // //
224 
225 #endif // !defined LocalConvolutionNormalVectorEstimator_h
226 
227 #undef LocalConvolutionNormalVectorEstimator_RECURSES
228 #endif // else defined(LocalConvolutionNormalVectorEstimator_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
DigitalSurfaceContainer::SurfelConstIterator ConstIterator
DigitalSurfaceContainer::SCell SCell
Aim: Computes the normal vector at a surface element by convolution of elementary normal vector to ad...
const DigitalSurface & mySurface
Reference to the digital surface.
LocalConvolutionNormalVectorEstimator(const LocalConvolutionNormalVectorEstimator &other)
const KernelFunctor & myKernelFunctor
Reference of the kernel convolution functor.
LocalConvolutionNormalVectorEstimator(ConstAlias< DigitalSurface > aSurface, ConstAlias< KernelFunctor > aFunctor)
void init(const double h, const unsigned int radius)
OutputIterator eval(const ConstIterator &itb, const ConstIterator &ite, OutputIterator result) const
BOOST_CONCEPT_ASSERT((concepts::CConvolutionWeights< TKernelFunctor >))
OutputIterator evalAll(OutputIterator result) const
Quantity eval(const ConstIterator &it) const
LocalConvolutionNormalVectorEstimator & operator=(const LocalConvolutionNormalVectorEstimator &other)
Space::RealVector RealVector
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: defines models of centered convolution kernel used for normal vector integration for instance.