30 #if defined(ColorBrightnessColorMap_RECURSES) 31 #error Recursive header files inclusion detected in ColorBrightnessColorMap.h 32 #else // defined(ColorBrightnessColorMap_RECURSES) 34 #define ColorBrightnessColorMap_RECURSES 36 #if !defined ColorBrightnessColorMap_h 38 #define ColorBrightnessColorMap_h 43 #include "DGtal/base/Common.h" 44 #include "Board/Board.h" 45 #include "DGtal/io/Color.h" 49 #define DGTAL_RGB2INT(R,G,B) (((R)<<16)|((G)<<8)|(B)) 50 #define DGTAL_RED_COMPONENT(I) (((I)>>16)&0xFF) 51 #define DGTAL_GREEN_COMPONENT(I) (((I)>>8)&0xFF) 52 #define DGTAL_BLUE_COMPONENT(I) ((I)&0xFF) 88 template <
typename PValue,
int PDefaultColor = DGTAL_RGB2INT( 255, 255, 255 ) >
108 =
Color( DGTAL_RED_COMPONENT( PDefaultColor ),
109 DGTAL_GREEN_COMPONENT( PDefaultColor ),
110 DGTAL_BLUE_COMPONENT( PDefaultColor ) ) );
159 const PValue &
min()
const;
166 const PValue &
max()
const;
184 const PValue & value );
218 static void HSVtoRGB(
double & r,
double & g,
double & b,
219 double h,
const double s,
const double v);
231 static void RGBtoHSV(
double & h,
double & s,
double & v,
232 const unsigned char r,
233 const unsigned char g,
234 const unsigned char b );
245 template <
typename PValue,
int PDefaultColor>
247 operator<< ( std::ostream & out, const ColorBrightnessColorMap<PValue,PDefaultColor> & object );
254 #include "DGtal/io/colormaps/ColorBrightnessColorMap.ih" 259 #endif // !defined ColorBrightnessColorMap_h 261 #undef ColorBrightnessColorMap_RECURSES 262 #endif // else defined(ColorBrightnessColorMap_RECURSES)
void selfDisplay(std::ostream &out) const
const PValue & min() const
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
static void HSVtoRGB(double &r, double &g, double &b, double h, const double s, const double v)
static void RGBtoHSV(double &h, double &s, double &v, const unsigned char r, const unsigned char g, const unsigned char b)
DGtal is the top-level namespace which contains all DGtal functions and types.
Structure representing an RGB triple with alpha component.
static Color getColor(const Color color, const PValue &min, const PValue &max, const PValue &value)
~ColorBrightnessColorMap()
Color operator()(const PValue &value) const
const PValue & max() const
ColorBrightnessColorMap()
ColorBrightnessColorMap & operator=(const ColorBrightnessColorMap &other)