30 #if defined(ColorBrightnessColorMap_RECURSES)
31 #error Recursive header files inclusion detected in ColorBrightnessColorMap.h
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>
254 #include "DGtal/io/colormaps/ColorBrightnessColorMap.ih"
261 #undef ColorBrightnessColorMap_RECURSES
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
ColorBrightnessColorMap & operator=(const ColorBrightnessColorMap &other)
ColorBrightnessColorMap(const PValue &min, const PValue &max, const Color color=Color(DGTAL_RED_COMPONENT(PDefaultColor), DGTAL_GREEN_COMPONENT(PDefaultColor), DGTAL_BLUE_COMPONENT(PDefaultColor)))
Color operator()(const PValue &value) const
static Color getColor(const Color color, const PValue &min, const PValue &max, const PValue &value)
ColorBrightnessColorMap()
~ColorBrightnessColorMap()
void selfDisplay(std::ostream &out) const
const PValue & min() const
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)
const PValue & max() const
ColorBrightnessColorMap(const ColorBrightnessColorMap &other)
Structure representing an RGB triple with alpha component.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)