50 double gam= brk_pt * 8;
56 double red_tem= 255. - (pow(((value-
m_vmin)/
m_dv), gam)) * (255.-(
double) red);
57 double green_tem= 255. - (pow(((value-
m_vmin)/
m_dv), gam)) * (255.-(
double) green);
58 double blue_tem= 255. - (pow(((value-
m_vmin)/
m_dv), gam)) * (255.-(
double) blue);
60 int ired_tmp =
static_cast< int> ( red_tem );
61 int igreen_tmp =
static_cast< int> ( green_tem );
62 int iblue_tmp =
static_cast< int> ( blue_tem );
65 color.
setColor ( ired_tmp, igreen_tmp, iblue_tmp );
virtual bool hasControlPoints() const
Returns true.
std::vector< double > m_control_points
A set of control points that might be used for the value to color transform.
BinToColor * clone() const
Creates a copy of itself.
The base class for the value to the color transformation.
BinToGamma class interface.
virtual bool isUserDefined() const
Returns true.
The class derived from the BinToColor class.
BinToGamma(const char *name)
The constructor.
double m_dv
The distance of the expected values, i.e.
virtual void doubleToColor(double value, Color &color) const
This function does the actual calculation that transforms the given value into a color using the curr...
void setColor(const std::string &)
Sets the color.
A Color class for creating the color object following the standard RGB color space.
double m_vmin
The minimum value expected.
virtual bool acceptChangeColor() const
Returns true if object can accept changing color,i.e.