|
| ColorMap () |
| Construct an unnamed empty color map. Will always return black. More...
|
|
| ColorMap (std::initializer_list< Color > init) |
| Construct an unnamed color map with equidistant values from 0 to 1 (inclusive). More...
|
|
| ColorMap (std::initializer_list< std::pair< float, Color >> init) |
| Construct an unnamed color map with given values. More...
|
|
| ColorMap (const std::string &name, std::initializer_list< Color > init) |
| Construct a named color map with equidistant values from 0 to 1 (inclusive). More...
|
|
| ColorMap (const std::string &name, std::initializer_list< std::pair< float, Color >> init) |
| Construct a named color map with given values. More...
|
|
bool | empty () const |
|
size_t | size () const |
| Get the number of keys. More...
|
|
void | clear () |
|
void | add_key (float value, const Color &color) |
| Add a key color at the given value. More...
|
|
Color | at (float value) const |
| Get the color for the given scalar value. More...
|
|
Color | at (float value, std::optional< float > vmin, std::optional< float > vmax) const |
| Get the color for the given scalar value. More...
|
|
Color | operator() (float value) const |
|
template<typename V > |
std::vector< Color > | operator() (const std::vector< V > &vector) const |
| Apply this colormap to a vector. More...
|
|
template<typename K , typename V > |
std::map< K, Color > | operator() (const std::map< K, V > &map) const |
| Apply this colormap to a map's values. More...
|
|
std::string | name () const |
|
void | setName (const std::string &name) |
|
float | vmin () const |
| The value corresponding to the bottom color. More...
|
|
float | vmax () const |
| The value corresponding to the top color. More...
|
|
void | set_vmin (float vmin) |
|
void | set_vmax (float vmax) |
|
void | set_vmin (const std::vector< float > &values) |
|
void | set_vmax (const std::vector< float > &values) |
|
template<class T > |
void | set_vmin (const std::vector< T > &values, std::function< float(const T &)> unaryFunc) |
| Set the value minimum to the minimum of values , measured by unaryFunc . You may have to specify the template argument (when template argument deduction fails). More...
|
|
template<class T > |
void | set_vmax (const std::vector< T > &values, std::function< float(const T &)> unaryFunc) |
| Set the value maximum to the maximum of values , measured by unaryFunc . You may have to specify the template argument (when template argument deduction fails). More...
|
|
void | set_vlimits (float vmin, float vmax) |
| Sets the value limits, i.e. scales the color map to the range [vmin, vmax]. More...
|
|
void | set_vlimits (const std::vector< float > &values) |
|
template<class T > |
void | set_vlimits (const std::vector< T > &values, std::function< float(const T &)> unaryFunc) |
| Set the value minimum and maximum to the minimum and maximum of values , measured by unaryFunc . You may have to specify the template argument (when template argument deduction fails). More...
|
|
ColorMap | reversed () const |
| Get this colormap reversed (but defined in the same value range as *this ). More...
|
|
A color map, mapping scalar values to colors.