DGtal  0.9.2
ImplicitFunctionLinearCellEmbedder.h
1 
17 #pragma once
18 
31 #if defined(ImplicitFunctionLinearCellEmbedder_RECURSES)
32 #error Recursive header files inclusion detected in ImplicitFunctionLinearCellEmbedder.h
33 #else // defined(ImplicitFunctionLinearCellEmbedder_RECURSES)
34 
35 #define ImplicitFunctionLinearCellEmbedder_RECURSES
36 
37 #if !defined ImplicitFunctionLinearCellEmbedder_h
38 
39 #define ImplicitFunctionLinearCellEmbedder_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConstAlias.h"
46 #include "DGtal/kernel/NumberTraits.h"
47 #include "DGtal/shapes/implicit/CImplicitFunction.h"
49 
50 namespace DGtal
51 {
52 
54 
67  template < typename TKSpace,
68  typename TImplicitFunction,
69  typename TEmbedder >
71  {
73 
74  public:
75  typedef TKSpace KSpace;
76  typedef TImplicitFunction ImplicitFunction;
77  typedef TEmbedder Embedder;
78  typedef typename KSpace::Cell Cell;
79  typedef typename KSpace::SCell SCell;
80  typedef typename KSpace::Space Space;
81  typedef typename Space::Point Point;
82  typedef typename Space::RealPoint RealPoint;
83  typedef typename ImplicitFunction::Value ImplicitFctValue;
84  typedef Cell Argument;
85  typedef RealPoint Value;
86 
91 
96 
102 
110 
121 
122  // ----------------------- Interface --------------------------------------
123  public:
124 
132  RealPoint embed( const Point & p ) const;
133 
141  RealPoint embedCell( const Cell & cell ) const;
142 
151  RealPoint embedSCell( const SCell & scell ) const;
152 
160  RealPoint operator()( const Cell & cell ) const;
161 
162  // ----------------------- Interface --------------------------------------
163  public:
164 
169  void selfDisplay ( std::ostream & out ) const;
170 
175  bool isValid() const;
176 
177  // ------------------------- Protected Datas ------------------------------
178  private:
179  // ------------------------- Private Datas --------------------------------
180  private:
181 
183  const KSpace* myPtrK;
185  const ImplicitFunction* myPtrFct;
187  const Embedder* myPtrEmbedder;
188 
189  // ------------------------- Hidden services ------------------------------
190  protected:
191 
192  private:
193 
194  }; // end of class ImplicitFunctionLinearCellEmbedder
195 
196 
203  template < typename TKSpace, typename TImplicitFunction, typename TEmbedder >
204  std::ostream&
205  operator<< ( std::ostream & out,
207 
208 } // namespace DGtal
209 
210 
212 // Includes inline functions.
213 #include "DGtal/shapes/implicit/ImplicitFunctionLinearCellEmbedder.ih"
214 
215 // //
217 
218 #endif // !defined ImplicitFunctionLinearCellEmbedder_h
219 
220 #undef ImplicitFunctionLinearCellEmbedder_RECURSES
221 #endif // else defined(ImplicitFunctionLinearCellEmbedder_RECURSES)
ImplicitFunctionLinearCellEmbedder & operator=(const ImplicitFunctionLinearCellEmbedder &other)
RealPoint operator()(const Cell &cell) const
void selfDisplay(std::ostream &out) const
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
void init(ConstAlias< KSpace > K, ConstAlias< ImplicitFunction > f, ConstAlias< Embedder > e)
const KSpace * myPtrK
A pointer on the cellular grid space.
const ImplicitFunction * myPtrFct
A pointer on the implicit function.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: Describes any function of the form f(x), where x is some real point in the given space...
RealPoint embedSCell(const SCell &scell) const
RealPoint embed(const Point &p) const
BOOST_CONCEPT_ASSERT((concepts::CImplicitFunction< TImplicitFunction >))
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: a cellular embedder for implicit functions, (default constructible, copy constructible, assignable). Model of CCellEmbedder.
const Embedder * myPtrEmbedder
A pointer on the digital embedder.
RealPoint embedCell(const Cell &cell) const