48 m_gamma = std::pow ( 100., ( f - 0.5) );
73 int index = static_cast <
int > (255. * std::pow( tmp,
m_gamma) );
74 assert ( index < 256 );
void calcGamma()
Calculate the gamma factor based on current control points.
The base class for the value to the color transformation.
bool hasControlPoints() const
Retruns true.
double m_dv
The distance of the expected values, i.e.
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.
BinToColorMap(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...
hippodraw::BinToColorMap class interface
A Color class for creating the color object following the standard RGB color space.
virtual void setControlPoints(const std::vector< double > &points)
Set the value of the control points.
std::vector< int > m_greens
vector of greens for color map.
std::vector< int > m_blues
vector of blues for color map.
std::vector< int > m_reds
vector of reds for color map.
void setColor(const std::string &)
Sets the color.
double m_gamma
The gamma correction factor.
virtual ~BinToColorMap()
The destructor.
The base class for the value to the color transformation.