The class derived from the BinToColor class. More...
#include <BinToUsrDefinedScale.h>
Public Member Functions | |
virtual bool | acceptChangeColor () const |
Returns true if object can accept changing color,i.e. | |
BinToUsrDefinedScale (const char *name) | |
The constructor. | |
BinToUsrDefinedScale (const std::string &model_name) | |
Another constructor with control points specified. | |
BinToUsrDefinedScale (const BinToUsrDefinedScale &) | |
The copy constructor. | |
virtual BinToColor * | clone () const |
Creates a copy of itself. | |
virtual void | doubleToColor (double value, Color &color) const |
const std::vector< double > & | getControlPoints () const |
Returns a list of control points. | |
Range | getRange () const |
Get the Range of expected values. | |
virtual bool | hasControlPoints () const |
Returns true . | |
virtual bool | isUserDefined () const |
Returns true . | |
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. |
Protected Attributes | |
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::string | m_name |
The name of this value transform. | |
double | m_vmin |
The minimum value expected. |
The class derived from the BinToColor class.
This class implements the transformation of a value to a color like the classic rainbow, but has two control parameters(user specified) to vary the transform. Unlike the other models with control parameters this model does not have sliders to change the parameters. They can be explicitly changed my the user by clicking on the Edit model button in the Inspector. One parameter is the distance between the break points and the other is the position of the center between the break points.
The member function doubleToColor() was taken from C code written by
Found on this web page http://astronomy.swin.edu.au/~pbourke/colour/colourramp/
Definition at line 39 of file BinToUsrDefinedScale.h.
BinToUsrDefinedScale | ( | const char * | name | ) |
The constructor.
Definition at line 19 of file BinToUsrDefinedScale.cxx.
References BinToColor::m_control_points.
Referenced by BinToUsrDefinedScale::clone().
BinToUsrDefinedScale | ( | const std::string & | model_name | ) |
Another constructor with control points specified.
BinToUsrDefinedScale | ( | const BinToUsrDefinedScale & | bin_to_color | ) |
The copy constructor.
Definition at line 27 of file BinToUsrDefinedScale.cxx.
|
virtualinherited |
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 BinToGamma, BinToLineStyle, BinToBlack, and BinToGreyScale.
Definition at line 94 of file BinToColor.cxx.
|
virtual |
Creates a copy of itself.
Implements BinToColor.
Definition at line 32 of file BinToUsrDefinedScale.cxx.
References BinToUsrDefinedScale::BinToUsrDefinedScale().
|
virtual |
Implements BinToColor.
Definition at line 42 of file BinToUsrDefinedScale.cxx.
References BinToColor::m_control_points, BinToColor::m_dv, BinToColor::m_vmin, and Color::setColor().
|
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().
|
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().
|
virtual |
Returns true
.
Returns true
as this class has control points with which the value to color transform can be varied.
Reimplemented from BinToColor.
Definition at line 182 of file BinToUsrDefinedScale.cxx.
|
virtual |
Returns true
.
Reimplemented from BinToColor.
Definition at line 189 of file BinToUsrDefinedScale.cxx.
|
inherited |
Returns the name of the value to color transform.
Reimplemented in BinToColorMap.
Definition at line 42 of file BinToColor.cxx.
References BinToColor::m_name.
Referenced by BinToColorXML::createElement(), ContourPointRep::drawProjectedValues(), and DisplayController::saveValueCtrlPts().
|
virtualinherited |
Set the value of the control points.
Interpretation of control points is left to derived classes.
Reimplemented in BinToColorMap.
Definition at line 78 of file BinToColor.cxx.
References BinToColor::m_control_points.
|
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 ColorSymbolPointRep::drawProjectedValues(), ColorBoxPointRep::drawProjectedValues(), and ContourPointRep::drawProjectedValues().
|
protectedinherited |
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(), BinToGamma::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToUsrDefinedScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColor::getControlPoints(), BinToColorMap::setControlPoints(), and BinToColor::setControlPoints().
|
protectedinherited |
The distance of the expected values, i.e.
maximum - minimum.
Definition at line 50 of file BinToColor.h.
Referenced by BinToGreyScale::doubleToColor(), BinToKamaeScale::doubleToColor(), BinTo3ColorScale::doubleToColor(), BinToGamma::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToFullColorScale::doubleToColor(), BinToUsrDefinedScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColorMap::doubleToColor(), BinToColor::getRange(), and BinToColor::setRange().
|
protectedinherited |
The name of this value transform.
Definition at line 36 of file BinToColor.h.
Referenced by BinToColor::name().
|
protectedinherited |
The minimum value expected.
Definition at line 54 of file BinToColor.h.
Referenced by BinToGreyScale::doubleToColor(), BinToKamaeScale::doubleToColor(), BinTo3ColorScale::doubleToColor(), BinToGamma::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToFullColorScale::doubleToColor(), BinToUsrDefinedScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColorMap::doubleToColor(), BinToColor::getRange(), and BinToColor::setRange().