#include <BinToColorMap.h>
It is needed, for example, for the drawing of color plots when the color of a point depends on its value.
Definition at line 29 of file BinToColorMap.h.
Public Member Functions | |
virtual bool | acceptChangeColor () const |
Returns true if object can accept changing color,i.e. | |
BinToColorMap (const BinToColorMap &bin_to_color) | |
The copy constructor. | |
virtual BinToColor * | clone () const =0 |
Creates a copy of itself. | |
virtual void | doubleToColor (double value, Color &color) const |
This function does the actual calculation that transforms the given value into a color using the current Range. | |
const std::vector < double > & | getControlPoints () const |
Returns a list of control points. | |
Range | getRange () const |
Get the Range of expected values. | |
bool | hasControlPoints () const |
Retruns true . | |
virtual bool | isUserDefined () const |
Returns true if object can be user defined. | |
const std::string & | name () const |
Returns the name of the value to color transform. | |
virtual void | setControlPoints (const std::vector< double > &points) |
Set the value of the control points. | |
void | setRange (const Range &r) |
Sets the range of the values passed. | |
virtual | ~BinToColorMap () |
The destructor. | |
Protected Member Functions | |
BinToColorMap (const std::string &) | |
Another constructor. | |
BinToColorMap (const char *name) | |
The constructor. | |
Protected Attributes | |
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. | |
double | m_dv |
The distance of the expected values, i.e. | |
std::vector< int > | m_greens |
vector of greens for color map. | |
std::string | m_name |
The name of this value transform. | |
std::vector< int > | m_reds |
vector of reds for color map. | |
double | m_vmin |
The minimum value expected. | |
Private Member Functions | |
void | calcGamma () |
Calculate the gamma factor based on current control points. | |
Private Attributes | |
double | m_gamma |
The gamma correction factor. |
BinToColorMap | ( | const char * | name | ) | [protected] |
The constructor.
Definition at line 21 of file BinToColorMap.cxx.
References BinToColorMap::calcGamma(), and BinToColor::m_control_points.
BinToColorMap | ( | const std::string & | ) | [protected] |
Another constructor.
BinToColorMap | ( | const BinToColorMap & | bin_to_color | ) |
The copy constructor.
Definition at line 51 of file BinToColorMap.cxx.
References BinToColorMap::calcGamma(), BinToColorMap::m_blues, BinToColor::m_control_points, BinToColorMap::m_greens, and BinToColorMap::m_reds.
~BinToColorMap | ( | ) | [virtual] |
bool acceptChangeColor | ( | ) | const [virtual, inherited] |
Returns true
if object can accept changing color,i.e.
enable the "Change color" button in plot inspector tabbed panel within inspector. Reimplemented in BinToBlack and BinToGreyScale. The base class implementation returns false
.
Reimplemented in BinToBlack, BinToGamma, BinToGreyScale, and BinToLineStyle.
Definition at line 94 of file BinToColor.cxx.
void calcGamma | ( | ) | [private] |
Calculate the gamma factor based on current control points.
Definition at line 45 of file BinToColorMap.cxx.
References BinToColor::m_control_points, and BinToColorMap::m_gamma.
Referenced by BinToColorMap::BinToColorMap(), and BinToColorMap::setControlPoints().
virtual BinToColor* clone | ( | ) | const [pure virtual] |
Creates a copy of itself.
Implements BinToColor.
Implemented in BinToBeach, BinToBGRY, BinToBluePastel, BinToBlueRed, BinToBlueWhite, BinToBWLinear, BinToEosA, BinToEosB, BinToGPink, BinToGRBW, BinToGWExpon, BinToGWLinear, BinToHardCandy, BinToHaze, BinToHueSatLight1, BinToHueSatLight2, BinToHueSatValue1, BinToHueSatValue2, BinToMacStyle, BinToNature, BinToOcean, BinToPastels, BinToPeppermint, BinToPrism, BinToPurpleRed, BinToRainbow, BinToRainbowIDL, BinToRedPurple, BinToRedTemp, BinToStdGamma2, and BinToStern.
void doubleToColor | ( | double | value, | |
Color & | color | |||
) | const [virtual] |
This function does the actual calculation that transforms the given value into a color using the current Range.
Implements BinToColor.
Definition at line 70 of file BinToColorMap.cxx.
References BinToColorMap::m_blues, BinToColor::m_dv, BinToColorMap::m_gamma, BinToColorMap::m_greens, BinToColorMap::m_reds, BinToColor::m_vmin, and Color::setColor().
const std::vector< double > & getControlPoints | ( | ) | const [inherited] |
Returns a list of control points.
If a derived class has control points to vary the transform of value to color returns the list of control points. Otherwise, the returned list is empty.
Definition at line 71 of file BinToColor.cxx.
References BinToColor::m_control_points.
Referenced by BinToColorXML::createElement().
Range getRange | ( | ) | const [inherited] |
Get the Range of expected values.
Definition at line 55 of file BinToColor.cxx.
References BinToColor::m_dv, and BinToColor::m_vmin.
Referenced by ContourPointRep::createContours(), and AxisRepColor::drawColorScale().
bool hasControlPoints | ( | ) | const [virtual] |
bool isUserDefined | ( | ) | const [virtual, inherited] |
Returns true
if object can be user defined.
Returns true
if value to color transform can be user defined. That is, the control points for the transform are editable. This base class implementation returns false
.
Reimplemented in BinToGamma, and BinToUsrDefinedScale.
Definition at line 85 of file BinToColor.cxx.
const std::string& name | ( | ) | const |
void setControlPoints | ( | const std::vector< double > & | points | ) | [virtual] |
Set the value of the control points.
Interpretation of control points is left to derived classes.
Reimplemented from BinToColor.
Definition at line 37 of file BinToColorMap.cxx.
References BinToColorMap::calcGamma(), and BinToColor::m_control_points.
void setRange | ( | const Range & | r | ) | [inherited] |
Sets the range of the values passed.
Definition at line 47 of file BinToColor.cxx.
References Range::length(), Range::low(), BinToColor::m_dv, and BinToColor::m_vmin.
Referenced by ContourPointRep::drawProjectedValues(), ColorSymbolPointRep::drawProjectedValues(), and ColorBoxPointRep::drawProjectedValues().
std::vector< int > m_blues [protected] |
vector of blues for color map.
Definition at line 50 of file BinToColorMap.h.
Referenced by BinToBeach::BinToBeach(), BinToBGRY::BinToBGRY(), BinToBluePastel::BinToBluePastel(), BinToBlueRed::BinToBlueRed(), BinToBlueWhite::BinToBlueWhite(), BinToBWLinear::BinToBWLinear(), BinToColorMap::BinToColorMap(), BinToEosA::BinToEosA(), BinToEosB::BinToEosB(), BinToGPink::BinToGPink(), BinToGRBW::BinToGRBW(), BinToGWExpon::BinToGWExpon(), BinToGWLinear::BinToGWLinear(), BinToHardCandy::BinToHardCandy(), BinToHaze::BinToHaze(), BinToHueSatLight1::BinToHueSatLight1(), BinToHueSatLight2::BinToHueSatLight2(), BinToHueSatValue1::BinToHueSatValue1(), BinToHueSatValue2::BinToHueSatValue2(), BinToMacStyle::BinToMacStyle(), BinToNature::BinToNature(), BinToOcean::BinToOcean(), BinToPastels::BinToPastels(), BinToPeppermint::BinToPeppermint(), BinToPrism::BinToPrism(), BinToPurpleRed::BinToPurpleRed(), BinToRainbow::BinToRainbow(), BinToRainbowIDL::BinToRainbowIDL(), BinToRedPurple::BinToRedPurple(), BinToRedTemp::BinToRedTemp(), BinToStdGamma2::BinToStdGamma2(), BinToStern::BinToStern(), and BinToColorMap::doubleToColor().
std::vector< double > m_control_points [protected, inherited] |
A set of control points that might be used for the value to color transform.
Definition at line 46 of file BinToColor.h.
Referenced by BinToColor::BinToColor(), BinToColorMap::BinToColorMap(), BinToColorScaleMovingBrkPt::BinToColorScaleMovingBrkPt(), BinToGamma::BinToGamma(), BinToMovingBrkPt::BinToMovingBrkPt(), BinToUsrDefinedScale::BinToUsrDefinedScale(), BinToColorMap::calcGamma(), BinToUsrDefinedScale::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToGamma::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColor::getControlPoints(), BinToColorMap::setControlPoints(), and BinToColor::setControlPoints().
double m_dv [protected, inherited] |
The distance of the expected values, i.e.
maximum - minimum.
Definition at line 50 of file BinToColor.h.
Referenced by BinToUsrDefinedScale::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToKamaeScale::doubleToColor(), BinToGreyScale::doubleToColor(), BinToGamma::doubleToColor(), BinToFullColorScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColorMap::doubleToColor(), BinTo3ColorScale::doubleToColor(), BinToColor::getRange(), and BinToColor::setRange().
double m_gamma [private] |
The gamma correction factor.
Definition at line 35 of file BinToColorMap.h.
Referenced by BinToColorMap::calcGamma(), and BinToColorMap::doubleToColor().
std::vector< int > m_greens [protected] |
vector of greens for color map.
Definition at line 47 of file BinToColorMap.h.
Referenced by BinToBeach::BinToBeach(), BinToBGRY::BinToBGRY(), BinToBluePastel::BinToBluePastel(), BinToBlueRed::BinToBlueRed(), BinToBlueWhite::BinToBlueWhite(), BinToBWLinear::BinToBWLinear(), BinToColorMap::BinToColorMap(), BinToEosA::BinToEosA(), BinToEosB::BinToEosB(), BinToGPink::BinToGPink(), BinToGRBW::BinToGRBW(), BinToGWExpon::BinToGWExpon(), BinToGWLinear::BinToGWLinear(), BinToHardCandy::BinToHardCandy(), BinToHaze::BinToHaze(), BinToHueSatLight1::BinToHueSatLight1(), BinToHueSatLight2::BinToHueSatLight2(), BinToHueSatValue1::BinToHueSatValue1(), BinToHueSatValue2::BinToHueSatValue2(), BinToMacStyle::BinToMacStyle(), BinToNature::BinToNature(), BinToOcean::BinToOcean(), BinToPastels::BinToPastels(), BinToPeppermint::BinToPeppermint(), BinToPrism::BinToPrism(), BinToPurpleRed::BinToPurpleRed(), BinToRainbow::BinToRainbow(), BinToRainbowIDL::BinToRainbowIDL(), BinToRedPurple::BinToRedPurple(), BinToRedTemp::BinToRedTemp(), BinToStdGamma2::BinToStdGamma2(), BinToStern::BinToStern(), and BinToColorMap::doubleToColor().
std::string m_name [protected, inherited] |
The name of this value transform.
Definition at line 36 of file BinToColor.h.
Referenced by BinToColor::name().
std::vector< int > m_reds [protected] |
vector of reds for color map.
Definition at line 44 of file BinToColorMap.h.
Referenced by BinToBeach::BinToBeach(), BinToBGRY::BinToBGRY(), BinToBluePastel::BinToBluePastel(), BinToBlueRed::BinToBlueRed(), BinToBlueWhite::BinToBlueWhite(), BinToBWLinear::BinToBWLinear(), BinToColorMap::BinToColorMap(), BinToEosA::BinToEosA(), BinToEosB::BinToEosB(), BinToGPink::BinToGPink(), BinToGRBW::BinToGRBW(), BinToGWExpon::BinToGWExpon(), BinToGWLinear::BinToGWLinear(), BinToHardCandy::BinToHardCandy(), BinToHaze::BinToHaze(), BinToHueSatLight1::BinToHueSatLight1(), BinToHueSatLight2::BinToHueSatLight2(), BinToHueSatValue1::BinToHueSatValue1(), BinToHueSatValue2::BinToHueSatValue2(), BinToMacStyle::BinToMacStyle(), BinToNature::BinToNature(), BinToOcean::BinToOcean(), BinToPastels::BinToPastels(), BinToPeppermint::BinToPeppermint(), BinToPrism::BinToPrism(), BinToPurpleRed::BinToPurpleRed(), BinToRainbow::BinToRainbow(), BinToRainbowIDL::BinToRainbowIDL(), BinToRedPurple::BinToRedPurple(), BinToRedTemp::BinToRedTemp(), BinToStdGamma2::BinToStdGamma2(), BinToStern::BinToStern(), and BinToColorMap::doubleToColor().
double m_vmin [protected, inherited] |
The minimum value expected.
Definition at line 54 of file BinToColor.h.
Referenced by BinToUsrDefinedScale::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToKamaeScale::doubleToColor(), BinToGreyScale::doubleToColor(), BinToGamma::doubleToColor(), BinToFullColorScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColorMap::doubleToColor(), BinTo3ColorScale::doubleToColor(), BinToColor::getRange(), and BinToColor::setRange().