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 );
BinToGamma class interface.
double m_dv
The distance of the expected values, i.e.
BinToColor * clone() const
Creates a copy of itself.
std::vector< double > m_control_points
A set of control points that might be used for the value to color transform.
double m_vmin
The minimum value expected.
virtual bool hasControlPoints() const
Returns true.
virtual bool acceptChangeColor() const
Returns true if object can accept changing color,i.e.
A Color class for creating the color object following the standard RGB color space.
The class derived from the BinToColor class.
virtual bool isUserDefined() const
Returns true.
void setColor(const std::string &)
Sets the color.
BinToGamma(const char *name)
The constructor.
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...
The base class for the value to the color transformation.