DGtal  0.9.3beta
CConstImage.h
1 
17 #pragma once
18 
28 #if defined(CConstImageRECURSES)
29 #error Recursive header files inclusion detected in CConstImage.h
30 #else // defined(CConstImageRECURSES)
31 
32 #define CConstImageRECURSES
33 
34 #if !defined CConstImage_h
35 
36 #define CConstImage_h
37 
38 #include <boost/concept_check.hpp>
39 #include <boost/concept/assert.hpp>
40 #include <boost/concept/requires.hpp>
41 
42 #include "DGtal/kernel/CPointFunctor.h"
43 #include "DGtal/kernel/domains/CDomain.h"
44 #include "DGtal/base/CConstBidirectionalRangeFromPoint.h"
45 #include "DGtal/base/CLabel.h"
46 #include "DGtal/images/CTrivialConstImage.h"
47 
48 namespace DGtal
49 {
50  namespace concepts
51  {
53  // struct CConstImage
93  template <typename I>
95  {
96 
97  public:
98 
99  //Inner types
100  typedef typename I::Domain Domain;
102 
103  typedef typename I::ConstRange ConstRange;
105 
107  {
108  ConceptUtils::sameType(i.domain(), d);
109  ConceptUtils::sameType(i.constRange(), r);
110  }
111 
112  private:
113  I i;
114  Domain d;
115  ConstRange r;
116 
117  };
118  }
119 } // namespace DGtal
120 
121 // //
123 
124 #endif // !defined CConstImage_h
125 
126 #undef CConstImageRECURSES
127 #endif // else defined(CConstImageRECURSES)
BOOST_CONCEPT_USAGE(CConstImage)
Definition: CConstImage.h:106
BOOST_CONCEPT_ASSERT((concepts::CDomain< Domain >))
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Definition: CDomain.h:129
void sameType(const T &t1, const T &t2)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: refined concept of const bidirectional range with a begin() method from a point.
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Definition: CConstImage.h:94