DGtal  1.5.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)
35 #define CSCellEmbedder_RECURSES
36 
37 #if !defined CSCellEmbedder_h
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)
Z3i::SCell SCell
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Aim: A cell embedder is a mapping from signed cells to Euclidean points. It adds inner types to funct...
BOOST_STATIC_ASSERT((ConceptUtils::SameType< SCell, typename KSpace::SCell >::value))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< RealPoint, Value >::value))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< SCell, Argument >::value))
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< KSpace >))
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:90
PointVector< 3, double > RealPoint