DGtal  1.4.beta
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)
35 #define ImplicitFunctionLinearCellEmbedder_RECURSES
36 
37 #if !defined ImplicitFunctionLinearCellEmbedder_h
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;
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;
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)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
Aim: a cellular embedder for implicit functions, (default constructible, copy constructible,...
void init(ConstAlias< KSpace > K, ConstAlias< ImplicitFunction > f, ConstAlias< Embedder > e)
void selfDisplay(std::ostream &out) const
ImplicitFunctionLinearCellEmbedder(const ImplicitFunctionLinearCellEmbedder &other)
RealPoint embedSCell(const SCell &scell) const
RealPoint embed(const Point &p) const
const ImplicitFunction * myPtrFct
A pointer on the implicit function.
BOOST_CONCEPT_ASSERT((concepts::CImplicitFunction< TImplicitFunction >))
const Embedder * myPtrEmbedder
A pointer on the digital embedder.
RealPoint operator()(const Cell &cell) const
RealPoint embedCell(const Cell &cell) const
const KSpace * myPtrK
A pointer on the cellular grid space.
ImplicitFunctionLinearCellEmbedder & operator=(const ImplicitFunctionLinearCellEmbedder &other)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Aim: Describes any function of the form f(x), where x is some real point in the given space,...
KSpace K