DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DigitalSurfaceEmbedderWithNormalVectorEstimator.h
1 
17 #pragma once
18 
31 #if defined(DigitalSurfaceEmbedderWithNormalVectorEstimator_RECURSES)
32 #error Recursive header files inclusion detected in DigitalSurfaceEmbedderWithNormalVectorEstimator.h
33 #else // defined(DigitalSurfaceEmbedderWithNormalVectorEstimator_RECURSES)
34 
35 #define DigitalSurfaceEmbedderWithNormalVectorEstimator_RECURSES
36 
37 #if !defined DigitalSurfaceEmbedderWithNormalVectorEstimator_h
38 
39 #define DigitalSurfaceEmbedderWithNormalVectorEstimator_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/NumberTraits.h"
46 #include "DGtal/topology/CDigitalSurfaceEmbedder.h"
48 
49 namespace DGtal
50 {
51 
52  // Forward declaration.
53  template < typename TDigitalSurfaceEmbedder,
54  typename TNormalVectorEstimator >
56 
58 
71  template < typename TDigitalSurfaceEmbedder,
72  typename TNormalVectorEstimator >
74  {
75  public:
77  < TDigitalSurfaceEmbedder, TNormalVectorEstimator > Self;
79 
80  typedef TDigitalSurfaceEmbedder DigitalSurfaceEmbedder;
81  typedef TNormalVectorEstimator NormalVectorEstimator;
82 
83  typedef typename DigitalSurfaceEmbedder::KSpace KSpace;
84  typedef typename DigitalSurfaceEmbedder::Surface Surface;
85  typedef typename DigitalSurfaceEmbedder::SCell SCell;
86  typedef typename DigitalSurfaceEmbedder::RealPoint RealPoint;
87  typedef typename DigitalSurfaceEmbedder::Argument Argument;
88  typedef typename DigitalSurfaceEmbedder::Value Value;
89 
90  typedef typename KSpace::Space Space;
91  typedef typename Space::RealVector RealVector;
92  typedef typename NormalVectorEstimator::Quantity Quantity;
93  typedef typename NormalVectorEstimator::DigitalSurface NVESurface;
94 
97 
99 
100 
105 
111  Self & operator=( const Self & other );
112 
119  ( const DigitalSurfaceEmbedder & aDSEmbedder,
120  const NormalVectorEstimator & anEstimator );
121 
127  ( const Self & other );
128 
133 
134  // ----------------------- Interface --------------------------------------
135  public:
136 
144  RealPoint operator()( const SCell & scell ) const;
145 
149  const Surface & surface() const;
150 
155  GradientMap gradientMap() const;
156 
162  RealVector gradient( const SCell & scell ) const;
163 
164  // ----------------------- Interface --------------------------------------
165  public:
166 
172  void selfDisplay ( std::ostream & out ) const;
173 
178  bool isValid() const;
179 
180  // ------------------------- Protected Datas ------------------------------
181  private:
182  // ------------------------- Private Datas --------------------------------
183  private:
184 
189 
190  // ------------------------- Hidden services ------------------------------
191  protected:
192 
193  }; // end of class DigitalSurfaceEmbedderWithNormalVectorEstimator
194 
206  template < typename TDigitalSurfaceEmbedder,
207  typename TNormalVectorEstimator >
209  {
210  public:
213 
214  typedef TDigitalSurfaceEmbedder DigitalSurfaceEmbedder;
215  typedef TNormalVectorEstimator NormalVectorEstimator;
216 
218  typedef typename Embedder::SCell Argument;
219  typedef typename Embedder::RealVector Value;
220 
223 
226 
228  Self & operator=( const Self & other );
229 
235  ( const Self & other );
236 
242  ( const Embedder & embedder );
243 
249  Value operator()( const Argument & arg ) const;
250 
251  protected:
254 
255  private:
256 
257  };
258 
265  template < typename TDigitalSurfaceEmbedder, typename TNormalVectorEstimator >
266  std::ostream&
267  operator<< ( std::ostream & out,
269 
270 } // namespace DGtal
271 
272 
274 // Includes inline functions.
275 #include "DGtal/geometry/surfaces/estimation/DigitalSurfaceEmbedderWithNormalVectorEstimator.ih"
276 
277 // //
279 
280 #endif // !defined DigitalSurfaceEmbedderWithNormalVectorEstimator_h
281 
282 #undef DigitalSurfaceEmbedderWithNormalVectorEstimator_RECURSES
283 #endif // else defined(DigitalSurfaceEmbedderWithNormalVectorEstimator_RECURSES)