DGtal  1.3.beta
CSCellEmbedder.h
1 
17 #pragma once
18 
31 #if defined(CSCellEmbedder_RECURSES)
32 #error Recursive header files inclusion detected in CSCellEmbedder.h
33 #else // defined(CSCellEmbedder_RECURSES)
34 
35 #define CSCellEmbedder_RECURSES
36 
37 #if !defined CSCellEmbedder_h
38 
39 #define CSCellEmbedder_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/CUnaryFunctor.h"
46 #include "DGtal/topology/CCellularGridSpaceND.h"
48 
49 // @since 0.8 In DGtal::concepts
50 namespace DGtal {
51  namespace concepts {
52 
54 // class CSCellEmbedder
96 template <typename T>
97 struct CSCellEmbedder : CUnaryFunctor<T, typename T::SCell, typename T::RealPoint>
98 {
99  // ----------------------- Concept checks ------------------------------
100 public:
101  typedef typename T::KSpace KSpace;
102  typedef typename T::SCell SCell;
103  typedef typename T::RealPoint RealPoint;
104  typedef typename T::Argument Argument;
105  typedef typename T::Value Value;
106 
112  {
114  }
115 
117  { // operator()
119  ConceptUtils::sameType( myK, myX.space() );
120  }
121  // ------------------------- Private Datas --------------------------------
122 private:
123  T myX; // do not require T to be default constructible.
126  const KSpace myK;
127 
128  // ------------------------- Internals ------------------------------------
129 private:
130 
131 }; // end of concept CSCellEmbedder
132 
133 } // namespace concepts
134 } // namespace DGtal
135 
136 // //
138 
139 #endif // !defined CSCellEmbedder_h
140 
141 #undef CSCellEmbedder_RECURSES
142 #endif // else defined(CSCellEmbedder_RECURSES)
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::concepts::CSCellEmbedder::myX
T myX
Definition: CSCellEmbedder.h:123
DGtal::concepts::CSCellEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< SCell, typename KSpace::SCell >::value))
SCell
Z3i::SCell SCell
Definition: fullConvexityShortestPaths3D.cpp:83
DGtal::concepts::CSCellEmbedder::RealPoint
T::RealPoint RealPoint
Definition: CSCellEmbedder.h:103
DGtal::concepts::CSCellEmbedder::myP
SCell myP
Definition: CSCellEmbedder.h:124
KSpace
Z3i::KSpace KSpace
Definition: testArithmeticalDSSComputerOnSurfels.cpp:48
DGtal::concepts::CSCellEmbedder::checkConstConstraints
void checkConstConstraints() const
Definition: CSCellEmbedder.h:116
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal::concepts::CSCellEmbedder::myRP
RealPoint myRP
Definition: CSCellEmbedder.h:125
DGtal::concepts::ConceptUtils::SameType
Definition: ConceptUtils.h:106
DGtal::concepts::CSCellEmbedder::SCell
T::SCell SCell
Definition: CSCellEmbedder.h:102
DGtal::concepts::CSCellEmbedder::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CSCellEmbedder)
Definition: CSCellEmbedder.h:111
DGtal::concepts::CSCellEmbedder::Value
T::Value Value
Definition: CSCellEmbedder.h:105
DGtal::concepts::CSCellEmbedder::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< KSpace >))
DGtal::concepts::CSCellEmbedder::KSpace
T::KSpace KSpace
Definition: CSCellEmbedder.h:101
DGtal::concepts::CSCellEmbedder::myK
const KSpace myK
Definition: CSCellEmbedder.h:126
DGtal::concepts::CSCellEmbedder::Argument
T::Argument Argument
Definition: CSCellEmbedder.h:104
RealPoint
Z2i::RealPoint RealPoint
Definition: testAstroid2D.cpp:46
DGtal::concepts::CUnaryFunctor
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:89
Value
double Value
Definition: testSimpleRandomAccessRangeFromPoint.cpp:38
DGtal::concepts::CSCellEmbedder
Aim: A cell embedder is a mapping from signed cells to Euclidean points. It adds inner types to funct...
Definition: CSCellEmbedder.h:97