31 #if defined(GradientColorMap_RECURSES)
32 #error Recursive header files inclusion detected in GradientColorMap.h
33 #else // defined(GradientColorMap_RECURSES)
35 #define GradientColorMap_RECURSES
37 #if !defined GradientColorMap_h
39 #define GradientColorMap_h
44 #include "DGtal/base/Common.h"
45 #include "Board/Board.h"
46 #include "DGtal/io/Color.h"
50 #define DGTAL_RGB2INT(R,G,B) (((R)<<16)|((G)<<8)|(B))
51 #define DGTAL_RED_COMPONENT(I) (((I)>>16)&0xFF)
52 #define DGTAL_GREEN_COMPONENT(I) (((I)>>8)&0xFF)
53 #define DGTAL_BLUE_COMPONENT(I) ((I)&0xFF)
114 template <
typename PValue,
116 int PDefaultFirstColor = -1,
117 int PDefaultLastColor = -1 >
140 = static_cast<ColorGradientPreset>( PDefaultPreset ),
141 const Color firstColor
144 Color( DGTAL_RED_COMPONENT( PDefaultFirstColor ),
145 DGTAL_GREEN_COMPONENT( PDefaultFirstColor ),
146 DGTAL_BLUE_COMPONENT( PDefaultFirstColor ) ),
147 const Color lastColor
150 Color( DGTAL_RED_COMPONENT( PDefaultLastColor ),
151 DGTAL_GREEN_COMPONENT( PDefaultLastColor ),
152 DGTAL_BLUE_COMPONENT( PDefaultLastColor ) )
215 const PValue &
min()
const;
222 const PValue &
max()
const;
239 const PValue & value );
272 template <
typename PValue,
274 int PDefaultFirstColor,
275 int PDefaultLastColor >
277 operator<< ( std::ostream & out, const GradientColorMap<PValue,PDefaultPreset,PDefaultFirstColor,PDefaultLastColor> & object );
284 #include "DGtal/io/colormaps/GradientColorMap.ih"
289 #endif // !defined GradientColorMap_h
291 #undef GradientColorMap_RECURSES
292 #endif // else defined(GradientColorMap_RECURSES)