DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CColorMap.h
1 
17 #pragma once
18 
31 #if defined(CColorMap_RECURSES)
32 #error Recursive header files inclusion detected in CColorMap.h
33 #else // defined(CColorMap_RECURSES)
34 
35 #define CColorMap_RECURSES
36 
37 #if !defined CColorMap_h
38 
39 #define CColorMap_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "boost/concept_check.hpp"
45 #include "DGtal/base/ConceptUtils.h"
46 #include "DGtal/base/CLabel.h"
47 #include "DGtal/base/Common.h"
48 #include "DGtal/io/Color.h"
50 
51 namespace DGtal
52 {
53 
55  // class CColorMap
99  template <typename CMap>
100  struct CColorMap
101  {
102  // ----------------------- Concept checks ------------------------------
103  public:
104 
105  typedef typename CMap::Value Value;
106 
108 
110  {
111  CMap myCMap( myMin, myMax );
112  // operator() exists, takes a Value, and returns a LibBoard::Color.
113  ConceptUtils::sameType( myColor, myCMap.operator()( myValue ) );
114  }
115 
116  // ------------------------- Private Datas --------------------------------
117  private:
118 
119  // ------------------------- Internals ------------------------------------
120  private:
123  }; // end of concept CColorMap
124 
125 } // namespace DGtal
126 
127 
129 // Includes inline functions.
130 #include "DGtal/io/colormaps/CColorMap.ih"
131 
132 // //
134 
135 #endif // !defined CColorMap_h
136 
137 #undef CColorMap_RECURSES
138 #endif // else defined(CColorMap_RECURSES)