Static lookup helpers mapping scalar values to QRgb / QColor across all DISPLIB palettes.
More...
#include <colormap.h>
Public Types | |
| typedef QSharedPointer< ColorMap > | SPtr |
| typedef QSharedPointer< const ColorMap > | ConstSPtr |
Public Member Functions | |
| ColorMap () | |
| ~ColorMap () | |
Static Public Member Functions | |
| static QRgb | valueToColor (double v, const QString &sMap) |
| static QRgb | valueToJet (double v) |
| static QRgb | valueToHot (double v) |
| static QRgb | valueToHotNegative1 (double v) |
| static QRgb | valueToHotNegative2 (double v) |
| static QRgb | valueToBone (double v) |
| static QRgb | valueToRedBlue (double v) |
| static QRgb | valueToCool (double v) |
| static QRgb | valueToViridis (double v) |
| static QRgb | valueToViridisNegated (double v) |
Static Protected Member Functions | |
| static double | linearSlope (double x, double m, double n) |
| static int | jetR (double v) |
| static int | jetG (double v) |
| static int | jetB (double v) |
| static int | hotR (double v) |
| static int | hotG (double v) |
| static int | hotB (double v) |
| static int | hotRNeg1 (double v) |
| static int | hotGNeg1 (double v) |
| static int | hotBNeg1 (double v) |
| static int | hotRNeg2 (double v) |
| static int | hotGNeg2 (double v) |
| static int | hotBNeg2 (double v) |
| static int | boneR (double v) |
| static int | boneG (double v) |
| static int | boneB (double v) |
| static int | rbR (double v) |
| static int | rbG (double v) |
| static int | rbB (double v) |
| static int | coolR (double v) |
| static int | coolG (double v) |
| static int | coolB (double v) |
Static lookup helpers mapping scalar values to QRgb / QColor across all DISPLIB palettes.
Each palette exists as a 256-row Eigen::MatrixX3i RGB table; the valueToXxx accessors interpolate between rows so callers can map any value in \([0,1]\) to a colour without instantiating an object. Bundled palettes include Viridis, Jet, Hot, HotNeg1, HotNeg2, Bone, Cool, RedBlue and the MNE-Python hot variant.
Definition at line 330 of file colormap.h.
| typedef QSharedPointer<const ColorMap> DISPLIB::ColorMap::ConstSPtr |
Const shared pointer type for ColorMap class.
Definition at line 334 of file colormap.h.
| typedef QSharedPointer<ColorMap> DISPLIB::ColorMap::SPtr |
Shared pointer type for ColorMap class.
Definition at line 333 of file colormap.h.
| ColorMap::ColorMap | ( | ) |
Default constructor
Definition at line 33 of file colormap.cpp.
| ColorMap::~ColorMap | ( | ) |
Destructs the ColorMap class.
Definition at line 39 of file colormap.cpp.
|
staticprotected |
Describes the blue Bone fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 237 of file colormap.cpp.
|
staticprotected |
Describes the green Bone fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 224 of file colormap.cpp.
|
staticprotected |
Describes the red Bone fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 211 of file colormap.cpp.
|
staticprotected |
Describes the blue Cool fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 299 of file colormap.cpp.
|
staticprotected |
Describes the green Cool fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 291 of file colormap.cpp.
|
staticprotected |
Describes the red Cool fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 283 of file colormap.cpp.
|
staticprotected |
Describes the blue Hot fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 126 of file colormap.cpp.
|
staticprotected |
Describes the blue Hot negative skewed fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 163 of file colormap.cpp.
|
staticprotected |
Describes the blue Hot negative skewed fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 200 of file colormap.cpp.
|
staticprotected |
Describes the green Hot fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 113 of file colormap.cpp.
|
staticprotected |
Describes the green Hot negative skewed fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 150 of file colormap.cpp.
|
staticprotected |
Describes the green Hot negative skewed fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 187 of file colormap.cpp.
|
staticprotected |
Describes the red Hot fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 102 of file colormap.cpp.
|
staticprotected |
Describes the red Hot negative skewed fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 137 of file colormap.cpp.
|
staticprotected |
Describes the red Hot negative skewed fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 174 of file colormap.cpp.
|
staticprotected |
Describes the blue Jet fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 87 of file colormap.cpp.
|
staticprotected |
Describes the green Jet fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 70 of file colormap.cpp.
|
staticprotected |
Describes the red Jet fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 53 of file colormap.cpp.
|
staticprotected |
Describes a linear function (y = mx + n) and returns the output value y
| [in] | x | input value. |
| [in] | m | slope. |
| [in] | n | offset. |
Definition at line 45 of file colormap.cpp.
|
staticprotected |
Describes the blue RedBlue fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 272 of file colormap.cpp.
|
staticprotected |
Describes the green RedBlue fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 261 of file colormap.cpp.
|
staticprotected |
Describes the red RedBlue fuzzy set. Calculates to an input value v [0,1] the corresponding output color value [0,255]
| [in] | v | input value [0,1]. |
Definition at line 250 of file colormap.cpp.
|
inlinestatic |
Returns a Bone RGB to a given double value [0,1]
| [in] | v | the double which has to be part of the intervall [0,1]. |
Definition at line 753 of file colormap.h.
|
inlinestatic |
Returns a Jet RGB to a given double value [0,1] and a colormap specified by sMap. If no matching colormap was found return Jet.
| [in] | v | the double which has to be part of the intervall [0,1]. |
| [in] | sMap | the colormap to choose. |
Definition at line 681 of file colormap.h.
|
inlinestatic |
Returns a Cool RGB to a given double value [-1,1]
| [in] | v | the double which has to be part of the intervall [-1,1]. |
Definition at line 769 of file colormap.h.
|
inlinestatic |
Returns a Hot RGB to a given double value [0,1]
| [in] | v | the double which has to be part of the intervall [0,1]. |
Definition at line 729 of file colormap.h.
|
inlinestatic |
Returns a negative skewed hot RGB to a given double value [0,1]
| [in] | v | the double which has to be part of the intervall [0,1]. |
Definition at line 737 of file colormap.h.
|
inlinestatic |
Returns a negative skewed hot RGB to a given double value [0,1]
| [in] | v | the double which has to be part of the intervall [0,1]. |
Definition at line 745 of file colormap.h.
|
inlinestatic |
Returns a Jet RGB to a given double value [0,1]
| [in] | v | the double which has to be part of the intervall [0,1]. |
Definition at line 721 of file colormap.h.
|
inlinestatic |
Returns a RedBlue RGB to a given double value [-1,1]
| [in] | v | the double which has to be part of the intervall [-1,1]. |
Definition at line 761 of file colormap.h.
|
inlinestatic |
Returns a Viridis RGB to a given double value [-1,1]
| [in] | v | the double which has to be part of the intervall [-1,1]. |
Definition at line 777 of file colormap.h.
|
inlinestatic |
Returns a negated Viridis RGB to a given double value [-1,1]
| [in] | v | the double which has to be part of the intervall [-1,1]. |
Definition at line 790 of file colormap.h.