DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CanonicEmbedder.h
1 
17 #pragma once
18 
31 #if defined(CanonicEmbedder_RECURSES)
32 #error Recursive header files inclusion detected in CanonicEmbedder.h
33 #else // defined(CanonicEmbedder_RECURSES)
34 
35 #define CanonicEmbedder_RECURSES
36 
37 #if !defined CanonicEmbedder_h
38 
39 #define CanonicEmbedder_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/CSpace.h"
47 
48 namespace DGtal
49 {
50 
52 // class CanonicEmbedder
63  template <typename TSpace>
65  {
66  public:
69 
70  typedef TSpace Space;
71  typedef typename Space::Integer Integer;
72  typedef typename Space::Point Point;
73  typedef typename Space::Vector Vector;
74  typedef typename Space::RealPoint RealPoint;
75  typedef Point Argument;
76  typedef RealPoint Value;
77 
78  // ----------------------- Standard services ------------------------------
79  public:
80 
85  Point floor( const RealPoint & p ) const;
86 
91  Point ceil( const RealPoint & p ) const;
92 
99  Point round( const RealPoint & p ) const;
100 
108  RealPoint embed( const Point & dp ) const;
109 
117  RealPoint operator()( const Point & dp ) const;
118 
119  // ----------------------- Interface --------------------------------------
120 public:
121 
126  void selfDisplay ( std::ostream & out ) const;
127 
132  bool isValid() const;
133 
134  // ------------------------- Protected Datas ------------------------------
135 private:
136  // ------------------------- Private Datas --------------------------------
137 private:
138 
139  // ------------------------- Hidden services ------------------------------
140 protected:
141 
142 
143  // ------------------------- Internals ------------------------------------
144 private:
145 
146 }; // end of class CanonicEmbedder
147 
148 
155  template <typename TSpace>
156  std::ostream&
157  operator<< ( std::ostream & out, const CanonicEmbedder<TSpace> & object );
158 
159 
160 } // namespace DGtal
161 
162 
164 // Includes inline functions.
165 #include "DGtal/kernel/CanonicEmbedder.ih"
166 
167 
168 // //
170 
171 #endif // !defined CanonicEmbedder_h
172 
173 #undef CanonicEmbedder_RECURSES
174 #endif // else defined(CanonicEmbedder_RECURSES)