DGtal  1.1.0
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;
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 
191 
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)
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::init
void init(const double h, const unsigned int radius)
ConstIterator
MyDigitalSurface::ConstIterator ConstIterator
Definition: greedy-plane-segmentation-ex2.cpp:93
DGtal::deprecated::LocalConvolutionNormalVectorEstimator
Aim: Computes the normal vector at a surface element by convolution of elementary normal vector to ad...
Definition: LocalConvolutionNormalVectorEstimator.h:86
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::DigitalSurface
TDigitalSurface DigitalSurface
Definition: LocalConvolutionNormalVectorEstimator.h:91
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::ConstIterator
Surface::ConstIterator ConstIterator
Definition: LocalConvolutionNormalVectorEstimator.h:94
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
DGtal::deprecated::concepts::CConvolutionWeights
Aim: defines models of centered convolution kernel used for normal vector integration for instance.
Definition: CConvolutionWeights.h:99
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::eval
Quantity eval(const ConstIterator &it) const
RealVector
Z3i::RealVector RealVector
Definition: sphereCotangentLaplaceOperator.cpp:71
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::~LocalConvolutionNormalVectorEstimator
~LocalConvolutionNormalVectorEstimator()
Definition: LocalConvolutionNormalVectorEstimator.h:114
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::myKernelFunctor
const KernelFunctor & myKernelFunctor
Reference of the kernel convolution functor.
Definition: LocalConvolutionNormalVectorEstimator.h:193
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::SCell
Surface::SCell SCell
Definition: LocalConvolutionNormalVectorEstimator.h:96
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::mySurface
const DigitalSurface & mySurface
Reference to the digital surface.
Definition: LocalConvolutionNormalVectorEstimator.h:190
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::myFlagIsInit
bool myFlagIsInit
True if the init() has been called.
Definition: LocalConvolutionNormalVectorEstimator.h:184
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CConvolutionWeights< TKernelFunctor >))
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::eval
OutputIterator eval(const ConstIterator &itb, const ConstIterator &ite, OutputIterator result) const
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::isValid
bool isValid() const
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::evalAll
OutputIterator evalAll(OutputIterator result) const
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::LocalConvolutionNormalVectorEstimator
LocalConvolutionNormalVectorEstimator()
Definition: LocalConvolutionNormalVectorEstimator.h:171
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::LocalConvolutionNormalVectorEstimator
LocalConvolutionNormalVectorEstimator(ConstAlias< DigitalSurface > aSurface, ConstAlias< KernelFunctor > aFunctor)
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::surface
const Surface & surface() const
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::LocalConvolutionNormalVectorEstimator
LocalConvolutionNormalVectorEstimator(const LocalConvolutionNormalVectorEstimator &other)
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::operator=
LocalConvolutionNormalVectorEstimator & operator=(const LocalConvolutionNormalVectorEstimator &other)
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::Surface
DigitalSurface Surface
Definition: LocalConvolutionNormalVectorEstimator.h:93
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::Quantity
Surface::KSpace::Space::RealVector Quantity
Definition: LocalConvolutionNormalVectorEstimator.h:95
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::myH
double myH
Grid size.
Definition: LocalConvolutionNormalVectorEstimator.h:181
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::KernelFunctor
TKernelFunctor KernelFunctor
Definition: LocalConvolutionNormalVectorEstimator.h:92
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::myRadius
unsigned int myRadius
Radius of the convolution.
Definition: LocalConvolutionNormalVectorEstimator.h:187
DGtal::deprecated::LocalConvolutionNormalVectorEstimator::eval
Quantity eval(const SCell &scell) const