Maps scalar values to texture coordinates/colors using a continuous/gradient style color map. More...
Public Member Functions | |
ScalarMapperContinuous () | |
Constructs an empty object. More... | |
double | rangeMinimum () const |
Returns the minimum range value. More... | |
double | rangeMaximum () const |
Returns the maximum range value. More... | |
void | setRange (double min, double max) |
Sets the range min and max values. More... | |
void | setColors (const std::vector< Color3f > &colorArray) |
Sets the scalar mapper level colors from an array of colors. More... | |
void | setColors (ColorTableFactory::ColorTable colorTable) |
Sets the scalar mapper level colors from a color table. More... | |
void | setColorsAtValues (const std::vector< double > &values, const std::vector< Color3f > &colorAtValues) |
Sets the colors at the given values and interpolate a continuous color table based on this. More... | |
virtual Vec2f | mapToTextureCoordinate (double scalarValue) const |
Maps scalar value to texture coordinate. More... | |
virtual Color3f | mapToColor (double scalarValue) const |
Maps scalar value to color. More... | |
virtual bool | updateTexture (Image *image) const |
Updates texture image. More... | |
virtual double | normalizedValue (double domainValue) const |
Maps domain value (range_min -> range_max) into a normalized value (0 -> 1) More... | |
virtual double | domainValue (double normalizedPosition) const |
Maps normalized value (0 -> 1) into a domain value (range_min -> range_max) More... | |
virtual unsigned int | version () const |
Returns the version of the scalar mapper. Version is increased whenever the mapper is changed. More... | |
![]() | |
virtual std::vector< double > | tickValuesHint () const |
Returns a suggestion for which tick marks to use. The base class returns an empty array. More... | |
Color4f | undefinedColor () const |
Returns the current undefined color. More... | |
void | setUndefinedColor (const Color4f &color) |
Sets the color to use for undefined values (cee::UNDEFINED_DOUBLE) More... | |
bool | aboveRangeColor (Color4f *color) const |
Returns true if an above range color is specified, and the color is set in the color parameter. More... | |
void | setAboveRangeColor (const Color4f &color) |
Sets the color to use for values that are above the range of the mapper. More... | |
void | clearAboveRangeColor () |
Removes the currently specified above range color, going back to the default behavior with any value above the current max range gets the max range color. More... | |
bool | belowRangeColor (Color4f *color) const |
Returns true if an below range color is specified, and the color is set in the color parameter. More... | |
void | setBelowRangeColor (const Color4f &color) |
Sets the color to use for values that are below the range of the mapper. More... | |
void | clearBelowRangeColor () |
Removes the currently specified below range color, going back to the default behavior with any value below the current max range gets the min range color. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Maps scalar values to texture coordinates/colors using a continuous/gradient style color map.
A scalar mapper producing a continuous gradient between the specified colors. Colors can be set with one of the ColorTableFactory presets, or specified manually by providing an array of colors The scalar mapper will interpolate between the specified colors to create a continuous gradient.
cee::vis::ScalarMapperContinuous::ScalarMapperContinuous | ( | ) |
Constructs an empty object.
|
virtual |
Maps normalized value (0 -> 1) into a domain value (range_min -> range_max)
Implements cee::vis::ScalarMapperContinuousDomain.
|
virtual |
Maps scalar value to color.
Implements cee::vis::ScalarMapper.
|
virtual |
Maps scalar value to texture coordinate.
Implements cee::vis::ScalarMapper.
|
virtual |
Maps domain value (range_min -> range_max) into a normalized value (0 -> 1)
Implements cee::vis::ScalarMapperContinuousDomain.
double cee::vis::ScalarMapperContinuous::rangeMaximum | ( | ) | const |
Returns the maximum range value.
double cee::vis::ScalarMapperContinuous::rangeMinimum | ( | ) | const |
Returns the minimum range value.
void cee::vis::ScalarMapperContinuous::setColors | ( | const std::vector< Color3f > & | colorArray | ) |
Sets the scalar mapper level colors from an array of colors.
void cee::vis::ScalarMapperContinuous::setColors | ( | ColorTableFactory::ColorTable | colorTable | ) |
Sets the scalar mapper level colors from a color table.
void cee::vis::ScalarMapperContinuous::setColorsAtValues | ( | const std::vector< double > & | values, |
const std::vector< Color3f > & | colorAtValues | ||
) |
Sets the colors at the given values and interpolate a continuous color table based on this.
Assumptions:
Note: The range of the mapper will be set to values[0] -> values[values.size() - 1]
void cee::vis::ScalarMapperContinuous::setRange | ( | double | min, |
double | max | ||
) |
Sets the range min and max values.
|
virtual |
Updates texture image.
Implements cee::vis::ScalarMapper.
|
virtual |
Returns the version of the scalar mapper. Version is increased whenever the mapper is changed.
Implements cee::vis::ScalarMapperContinuousDomain.