DGtal  1.3.beta
CanonicDigitalSurfaceEmbedder.h
1 
17 #pragma once
18 
31 #if defined(CanonicDigitalSurfaceEmbedder_RECURSES)
32 #error Recursive header files inclusion detected in CanonicDigitalSurfaceEmbedder.h
33 #else // defined(CanonicDigitalSurfaceEmbedder_RECURSES)
34 
35 #define CanonicDigitalSurfaceEmbedder_RECURSES
36 
37 #if !defined CanonicDigitalSurfaceEmbedder_h
38 
39 #define CanonicDigitalSurfaceEmbedder_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConstAlias.h"
46 #include "DGtal/topology/CCellularGridSpaceND.h"
48 
49 namespace DGtal
50 {
51 
53 // class CanonicDigitalSurfaceEmbedder
64  template <typename TDigitalSurface>
66  {
67  public:
69 
70  typedef TDigitalSurface Surface;
71  typedef typename Surface::KSpace KSpace;
73  typedef typename KSpace::SCell SCell;
74  typedef typename KSpace::Space Space;
75  typedef typename Space::RealPoint RealPoint;
76  typedef SCell Argument;
77  typedef RealPoint Value;
78 
79  typedef typename Space::Integer Integer;
80  typedef typename Space::Point Point;
81 
82  // ----------------------- Standard services ------------------------------
83  public:
88 
93 
98 
103  CanonicDigitalSurfaceEmbedder( const Self & other );
104 
110  Self & operator=( const Self & other );
111 
115  const KSpace & space() const
116  {
117  return mySurface->container().space();
118  }
119 
120 
124  const Surface & surface() const;
125 
126 
134  RealPoint embed( const SCell & cell ) const;
135 
143  RealPoint operator()( const SCell & cell ) const;
144 
145  // ----------------------- Interface --------------------------------------
146 public:
147 
152  void selfDisplay ( std::ostream & out ) const;
153 
158  bool isValid() const;
159 
160  // ------------------------- Protected Datas ------------------------------
161  protected:
163 
164  // ------------------------- Private Datas --------------------------------
165 private:
166 
167  // ------------------------- Hidden services ------------------------------
168 protected:
169 
170 
171  // ------------------------- Internals ------------------------------------
172 private:
173 
174 }; // end of class CanonicDigitalSurfaceEmbedder
175 
176 
183  template <typename TDigitalSurface>
184  std::ostream&
185  operator<< ( std::ostream & out, const CanonicDigitalSurfaceEmbedder<TDigitalSurface> & object );
186 
187 
188 } // namespace DGtal
189 
190 
192 // Includes inline functions.
193 #include "DGtal/topology/CanonicDigitalSurfaceEmbedder.ih"
194 
195 
196 // //
198 
199 #endif // !defined CanonicDigitalSurfaceEmbedder_h
200 
201 #undef CanonicDigitalSurfaceEmbedder_RECURSES
202 #endif // else defined(CanonicDigitalSurfaceEmbedder_RECURSES)
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
DGtal::CanonicDigitalSurfaceEmbedder::KSpace
Surface::KSpace KSpace
Definition: CanonicDigitalSurfaceEmbedder.h:71
DGtal::DigitalSurface
Aim: Represents a set of n-1-cells in a nD space, together with adjacency relation between these cell...
Definition: DigitalSurface.h:139
DGtal::CanonicDigitalSurfaceEmbedder::surface
const Surface & surface() const
DGtal::CanonicDigitalSurfaceEmbedder::~CanonicDigitalSurfaceEmbedder
~CanonicDigitalSurfaceEmbedder()
DGtal::CanonicDigitalSurfaceEmbedder
Aim: A trivial embedder for digital surfaces, which corresponds to the canonic injection of cell cent...
Definition: CanonicDigitalSurfaceEmbedder.h:65
DGtal::CanonicDigitalSurfaceEmbedder::space
const KSpace & space() const
Definition: CanonicDigitalSurfaceEmbedder.h:115
DGtal::concepts::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition: CCellularGridSpaceND.h:162
DGtal::CanonicDigitalSurfaceEmbedder::Value
RealPoint Value
Definition: CanonicDigitalSurfaceEmbedder.h:77
DGtal::CanonicDigitalSurfaceEmbedder::Integer
Space::Integer Integer
Definition: CanonicDigitalSurfaceEmbedder.h:79
DGtal::SignedKhalimskyCell
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Definition: KhalimskySpaceND.h:208
DGtal::CanonicDigitalSurfaceEmbedder::mySurface
const Surface * mySurface
Definition: CanonicDigitalSurfaceEmbedder.h:162
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::SpaceND
Definition: SpaceND.h:95
DGtal::CanonicDigitalSurfaceEmbedder::operator=
Self & operator=(const Self &other)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::CanonicDigitalSurfaceEmbedder::RealPoint
Space::RealPoint RealPoint
Definition: CanonicDigitalSurfaceEmbedder.h:75
DGtal::CanonicDigitalSurfaceEmbedder::Self
CanonicDigitalSurfaceEmbedder< TDigitalSurface > Self
Definition: CanonicDigitalSurfaceEmbedder.h:68
DGtal::CanonicDigitalSurfaceEmbedder::Space
KSpace::Space Space
Definition: CanonicDigitalSurfaceEmbedder.h:74
DGtal::CanonicDigitalSurfaceEmbedder::embed
RealPoint embed(const SCell &cell) const
DGtal::CanonicDigitalSurfaceEmbedder::operator()
RealPoint operator()(const SCell &cell) const
DGtal::CanonicDigitalSurfaceEmbedder::Argument
SCell Argument
Definition: CanonicDigitalSurfaceEmbedder.h:76
DGtal::CanonicDigitalSurfaceEmbedder::SCell
KSpace::SCell SCell
Definition: CanonicDigitalSurfaceEmbedder.h:73
DGtal::CanonicDigitalSurfaceEmbedder::Point
Space::Point Point
Definition: CanonicDigitalSurfaceEmbedder.h:80
DGtal::CanonicDigitalSurfaceEmbedder::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
DGtal::DigitalSurface::KSpace
DigitalSurfaceContainer::KSpace KSpace
Definition: DigitalSurface.h:159
DGtal::CanonicDigitalSurfaceEmbedder::CanonicDigitalSurfaceEmbedder
CanonicDigitalSurfaceEmbedder()
DGtal::SpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
DGtal::CanonicDigitalSurfaceEmbedder::isValid
bool isValid() const
DGtal::CanonicDigitalSurfaceEmbedder::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< KSpace >))
DGtal::CanonicDigitalSurfaceEmbedder::Surface
TDigitalSurface Surface
Definition: CanonicDigitalSurfaceEmbedder.h:70