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 );
virtual ~BinToColorMap()
The destructor.
std::vector< int > m_blues
vector of blues for color map.
std::vector< double > m_control_points
A set of control points that might be used for the value to color transform.
virtual void setControlPoints(const std::vector< double > &points)
Set the value of the control points.
bool hasControlPoints() const
Retruns true.
The base class for the value to the color transformation.
void calcGamma()
Calculate the gamma factor based on current control points.
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...
std::vector< int > m_greens
vector of greens for color map.
void setColor(const std::string &)
Sets the color.
A Color class for creating the color object following the standard RGB color space.
BinToColorMap(const char *name)
The constructor.
The base class for the value to the color transformation.
double m_vmin
The minimum value expected.
hippodraw::BinToColorMap class interface
std::vector< int > m_reds
vector of reds for color map.
double m_gamma
The gamma correction factor.