#include <BinToUsrDefinedScale.h>
Inheritance diagram for BinToUsrDefinedScale:
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.
Definition at line 37 of file BinToUsrDefinedScale.h.
Public Member Functions | |
BinToUsrDefinedScale (const BinToUsrDefinedScale &) | |
The copy constructor. | |
BinToUsrDefinedScale (const std::string &model_name) | |
Another constructor with control points specified. | |
BinToUsrDefinedScale (const char *name) | |
The constructor. | |
virtual BinToColor * | clone () const |
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. | |
const Range & | getRange () const |
Get the Range. | |
virtual bool | hasControlPoints () const |
Returns true . | |
const std::string & | name () const |
Returns the name of the value to color transform. | |
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. | |
std::string | m_name |
The name of this value transform. | |
Range | m_range |
The range of the values given to this object. |
|
The constructor.
Definition at line 17 of file BinToUsrDefinedScale.cxx. References BinToColor::m_control_points. Referenced by clone(). |
|
Another constructor with control points specified.
Definition at line 25 of file BinToUsrDefinedScale.cxx. References BinToColor::m_control_points. |
|
The copy constructor.
Definition at line 33 of file BinToUsrDefinedScale.cxx. References BinToColor::m_control_points. |
|
Creates a copy of itself.
Implements BinToColor. Definition at line 44 of file BinToUsrDefinedScale.cxx. References BinToUsrDefinedScale(). |
|
This function does the actual calculation that transforms the given value into a color using the current Range.
Implements BinToColor. Definition at line 52 of file BinToUsrDefinedScale.cxx. References Range::length(), Range::low(), BinToColor::m_control_points, BinToColor::m_range, and Color::setColor(). |
|
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 62 of file BinToColor.cxx. References BinToColor::m_control_points. Referenced by BinToColorXML::createElement(). |
|
Get the Range.
Definition at line 48 of file BinToColor.cxx. References BinToColor::m_range. Referenced by ContourPointRep::createContours(), and AxisRepColor::drawColorScale(). |
|
Returns
Returns Reimplemented from BinToColor. Definition at line 118 of file BinToUsrDefinedScale.cxx. |
|
Returns the name of the value to color transform.
Definition at line 38 of file BinToColor.cxx. References BinToColor::m_name. Referenced by BinToColorXML::createElement(). |
|
Set the value of the control points. Interpretation of control points is left to derived classes. Definition at line 69 of file BinToColor.cxx. References BinToColor::m_control_points. |
|
Sets the range of the values passed.
Definition at line 43 of file BinToColor.cxx. References BinToColor::m_range. Referenced by ContourPointRep::drawProjectedValues(), ColorSymbolPointRep::drawProjectedValues(), and ColorBoxPointRep::drawProjectedValues(). |
|
A set of control points that might be used for the value to color transform.
Definition at line 42 of file BinToColor.h. Referenced by BinToColorScaleMovingBrkPt::BinToColorScaleMovingBrkPt(), BinToMovingBrkPt::BinToMovingBrkPt(), BinToUsrDefinedScale(), doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColor::getControlPoints(), and BinToColor::setControlPoints(). |
|
The name of this value transform.
Definition at line 49 of file BinToColor.h. Referenced by BinToColor::name(). |
|
The range of the values given to this object. It is needed in the algorithms used to calculate the color returned. Definition at line 46 of file BinToColor.h. Referenced by doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToKamaeScale::doubleToColor(), BinToGreyScale::doubleToColor(), BinToFullColorScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColorScale::doubleToColor(), BinTo3ColorScale::doubleToColor(), BinToColor::getRange(), and BinToColor::setRange(). |