DGtal  0.9.2
CanonicCellEmbedder.h
1 
17 #pragma once
18 
31 #if defined(CanonicCellEmbedder_RECURSES)
32 #error Recursive header files inclusion detected in CanonicCellEmbedder.h
33 #else // defined(CanonicCellEmbedder_RECURSES)
34 
35 #define CanonicCellEmbedder_RECURSES
36 
37 #if !defined CanonicCellEmbedder_h
38 
39 #define CanonicCellEmbedder_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConstAlias.h"
46 #include "DGtal/topology/CPreCellularGridSpaceND.h"
48 
49 namespace DGtal
50 {
51 
53 // class CanonicCellEmbedder
64  template <typename TKSpace>
66  {
67  public:
70 
71  typedef TKSpace KSpace;
72  typedef typename KSpace::Cell Cell;
73  typedef typename KSpace::Space Space;
74  typedef typename Space::RealPoint RealPoint;
75  typedef Cell Argument;
76  typedef RealPoint Value;
77 
78  typedef typename Space::Integer Integer;
79  typedef typename Space::Point Point;
80 
81  // ----------------------- Standard services ------------------------------
82  public:
87 
92 
97 
102  CanonicCellEmbedder( const Self & other );
103 
109  Self & operator=( const Self & other );
110 
114  const KSpace & space() const;
115 
123  RealPoint embed( const Cell & cell ) const;
124 
132  RealPoint operator()( const Cell & cell ) const;
133 
134  // ----------------------- Interface --------------------------------------
135 public:
136 
141  void selfDisplay ( std::ostream & out ) const;
142 
147  bool isValid() const;
148 
149  // ------------------------- Protected Datas ------------------------------
150  protected:
151  const KSpace* myKSpace;
152 
153  // ------------------------- Private Datas --------------------------------
154 private:
155 
156  // ------------------------- Hidden services ------------------------------
157 protected:
158 
159 
160  // ------------------------- Internals ------------------------------------
161 private:
162 
163 }; // end of class CanonicCellEmbedder
164 
165 
172  template <typename TKSpace>
173  std::ostream&
174  operator<< ( std::ostream & out, const CanonicCellEmbedder<TKSpace> & object );
175 
176 
177 } // namespace DGtal
178 
179 
181 // Includes inline functions.
182 #include "DGtal/topology/CanonicCellEmbedder.ih"
183 
184 
185 // //
187 
188 #endif // !defined CanonicCellEmbedder_h
189 
190 #undef CanonicCellEmbedder_RECURSES
191 #endif // else defined(CanonicCellEmbedder_RECURSES)
Aim: This concept describes an unbounded cellular grid space in nD. In these spaces obtained by carte...
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
RealPoint operator()(const Cell &cell) const
void selfDisplay(std::ostream &out) const
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:141
CanonicCellEmbedder< TKSpace > Self
Aim: A trivial embedder for signed and unsigned cell, which corresponds to the canonic injection of c...
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
DGtal is the top-level namespace which contains all DGtal functions and types.
Self & operator=(const Self &other)
const KSpace & space() const
RealPoint embed(const Cell &cell) const
BOOST_CONCEPT_ASSERT((concepts::CPreCellularGridSpaceND< TKSpace >))