DGtal 1.4.0
Loading...
Searching...
No Matches
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)
35#define CanonicDigitalSurfaceEmbedder_RECURSES
36
37#if !defined CanonicDigitalSurfaceEmbedder_h
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
49namespace 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;
78
79 typedef typename Space::Integer Integer;
80 typedef typename Space::Point Point;
81
82 // ----------------------- Standard services ------------------------------
83 public:
88
93
98
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 --------------------------------------
146public:
147
152 void selfDisplay ( std::ostream & out ) const;
153
158 bool isValid() const;
159
160 // ------------------------- Protected Datas ------------------------------
161 protected:
163
164 // ------------------------- Private Datas --------------------------------
165private:
166
167 // ------------------------- Hidden services ------------------------------
168protected:
169
170
171 // ------------------------- Internals ------------------------------------
172private:
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)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition ConstAlias.h:187
DigitalSurfaceContainer::KSpace KSpace
Aim: Implements basic operations that will be used in Point and Vector classes.
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 ClosedIntegerHalfPlane< TSpace > &object)
Aim: A trivial embedder for digital surfaces, which corresponds to the canonic injection of cell cent...
CanonicDigitalSurfaceEmbedder(const Self &other)
Self & operator=(const Self &other)
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< KSpace >))
void selfDisplay(std::ostream &out) const
RealPoint operator()(const SCell &cell) const
CanonicDigitalSurfaceEmbedder(ConstAlias< Surface > aSurface)
CanonicDigitalSurfaceEmbedder< TDigitalSurface > Self
RealPoint embed(const SCell &cell) const
const Surface & surface() const
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...