DGtal  1.4.beta
CanonicSCellEmbedder.h
1 
17 #pragma once
18 
31 #if defined(CanonicSCellEmbedder_RECURSES)
32 #error Recursive header files inclusion detected in CanonicSCellEmbedder.h
33 #else // defined(CanonicSCellEmbedder_RECURSES)
35 #define CanonicSCellEmbedder_RECURSES
36 
37 #if !defined CanonicSCellEmbedder_h
39 #define CanonicSCellEmbedder_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 CanonicSCellEmbedder
64  template <typename TKSpace>
66  {
67  public:
70 
71  typedef TKSpace KSpace;
72  typedef typename KSpace::SCell SCell;
73  typedef typename KSpace::Space Space;
74  typedef typename Space::RealPoint RealPoint;
75  typedef SCell 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  CanonicSCellEmbedder( const Self & other );
103 
109  Self & operator=( const Self & other );
110 
114  const KSpace & space() const;
115 
123  RealPoint embed( const SCell & cell ) const;
124 
132  RealPoint operator()( const SCell & cell ) const;
133 
134  // ----------------------- Interface --------------------------------------
135 public:
136 
137  /*
138  * Writes/Displays the object on an output stream.
139  * @param out the output stream where the object is written.
140  */
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 CanonicSCellEmbedder
164 
165 
172  template <typename TKSpace>
173  std::ostream&
174  operator<< ( std::ostream & out, const CanonicSCellEmbedder<TKSpace> & object );
175 
176 
177 } // namespace DGtal
178 
179 
181 // Includes inline functions.
182 #include "DGtal/topology/CanonicSCellEmbedder.ih"
183 
184 
185 // //
187 
188 #endif // !defined CanonicSCellEmbedder_h
189 
190 #undef CanonicSCellEmbedder_RECURSES
191 #endif // else defined(CanonicSCellEmbedder_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:593
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.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Aim: A trivial embedder for signed cell, which corresponds to the canonic injection of cell centroids...
CanonicSCellEmbedder(const Self &other)
const KSpace & space() const
Self & operator=(const Self &other)
RealPoint operator()(const SCell &cell) const
BOOST_CONCEPT_ASSERT((concepts::CPreCellularGridSpaceND< TKSpace >))
CanonicSCellEmbedder(ConstAlias< KSpace > aKSpace)
RealPoint embed(const SCell &cell) const
CanonicSCellEmbedder< TKSpace > Self
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Aim: This concept describes an unbounded cellular grid space in nD. In these spaces obtained by carte...