#include <ScalarColorMap.h>
|
| enum | ColorRangePreset {
RAINBOW
, COOLWARM
, VIRIDIS
, INFERNO
,
PLASMA
, GRAYSCALE
, BLUE_WHITE_RED
, CIVIDIS
,
BONE
, COPPER
, AFMHOT
} |
| |
◆ ColorRangePreset
Enum representation of predefined color ranges than can be set in the class.
| Enumerator |
|---|
| RAINBOW | |
| COOLWARM | |
| VIRIDIS | |
| INFERNO | |
| PLASMA | |
| GRAYSCALE | |
| BLUE_WHITE_RED | |
| CIVIDIS | |
| BONE | |
| COPPER | |
| AFMHOT | |
◆ ScalarColorMap() [1/2]
| MOMENTUM_NAMESPACE::ScalarColorMap::ScalarColorMap |
( |
| ) |
|
◆ ScalarColorMap() [2/2]
| MOMENTUM_NAMESPACE::ScalarColorMap::ScalarColorMap |
( |
double |
minScalar, |
|
|
double |
maxScalar |
|
) |
| |
Constructor.
- Parameters
-
| preset | - preset enum for one of the predefined color ranges that exist in the class that can be chosen to initialize the colors in the map. |
| minScalar | - The minimum value of the scalar interval that is mapped to the color range. |
| maxScalar | - The maximum value of the scalar interval that is mapped to the color range. |
- Note
- - if the specified minimum scalar larger than the current maximum value or vice versa, the values will be switched.
◆ getColor()
| Vec4 MOMENTUM_NAMESPACE::ScalarColorMap::getColor |
( |
double |
scalar, |
|
|
bool |
modifyAlpha = false |
|
) |
| const |
Get an agx representation of a color value in the map given a scalar inside the interval.
- Parameters
-
| scalar | - a specified scalar that is used to interpolate a color in the given range. |
| modifyAlpha | - true if the alpha value of the color should be modified, false otherwise. |
- Returns
- an agx::Vec4f color representation given the specified scalar value.
◆ getColors()
| std::vector< Vec4 > MOMENTUM_NAMESPACE::ScalarColorMap::getColors |
( |
| ) |
const |
- Returns
- vector containing colors used the current interval.
◆ getMaxScalar()
| double MOMENTUM_NAMESPACE::ScalarColorMap::getMaxScalar |
( |
| ) |
const |
- Returns
- the maximum scalar value of the interval.
◆ getMinScalar()
| double MOMENTUM_NAMESPACE::ScalarColorMap::getMinScalar |
( |
| ) |
const |
- Returns
- the minimum scalar value of the interval.
◆ setColors()
| void MOMENTUM_NAMESPACE::ScalarColorMap::setColors |
( |
const std::vector< Vec4 > & |
colorVector | ) |
|
◆ setColorsFromPreset()
| void MOMENTUM_NAMESPACE::ScalarColorMap::setColorsFromPreset |
( |
ColorRangePreset |
colorRangePreset | ) |
|
Set a range of colors from an available color range preset in the class.
- Parameters
-
| colorRangePreset | - the specified preset enum that is used to construct the color range. |
◆ setMaxScalar()
| void MOMENTUM_NAMESPACE::ScalarColorMap::setMaxScalar |
( |
double |
maxScalar | ) |
|
Set the maximum scalar of the interval.
- Parameters
-
| maxScalar | - the maximum scalar value in the interval. |
- Note
- - the specified maximum scalar will be rejected if the value is less than the current minimum value.
◆ setMinScalar()
| void MOMENTUM_NAMESPACE::ScalarColorMap::setMinScalar |
( |
double |
minScalar | ) |
|
Set the min scalar of the interval.
- Parameters
-
| minScalar | - the minimum scalar value in the interval. |
- Note
- - the specified minimum scalar will be rejected if the value is larger than the current maximum value.
◆ setScalarInterval()
| void MOMENTUM_NAMESPACE::ScalarColorMap::setScalarInterval |
( |
double |
minScalar, |
|
|
double |
maxScalar |
|
) |
| |
Set the scalars of the interval used in the color interpolation.
- Parameters
-
| minScalar | - the minimum scalar value in the interval. |
| maxScalar | - the maximum scalar value in the interval. |
- Note
- - if the specified minimum scalar larger than the current maximum value or vice versa, the values will be switched.