#include <TFInterpolator.h>
|
static float | interpolate (type, float leftVal, float rightVal, float r) |
|
static float | interpCirc (type t, float leftVal, float rightVal, float r) |
|
static float * | genDivergentMap (float rgb1[3], float rgb2[3], int numColors) |
|
static int | divergentInterpolation (float rgb1[3], float rgb2[3], float output[3], float interp, bool corrective=false) |
|
static void | correctiveDivergentInterpolation (float rgb1[3], float rgb2[3], float output[3], float interp) |
|
static float | adjustHue (float m1, float s1, float h1, float m2) |
|
static int | msh2srgb (float msh[3], float rgb[3]) |
|
static int | msh2lab (float msh[3], float lab[3]) |
|
static int | lab2srgb (float lab[3], float rgb[3]) |
|
static int | srgb2msh (float rgb[3], float msh[3]) |
|
static int | srgb2lab (float rgb[3], float lab[3]) |
|
static int | lab2msh (float lab[3], float msh[3]) |
|
static int | srgb2xyz (float rgb[3], float xyz[3]) |
|
static int | xyz2srgb (float xyz[3], float rgb[3]) |
|
static int | rgb2srgb (float rgb[3], float srgb[3]) |
|
static int | srgb2rgb (float srgb[3], float rgb[3]) |
|
static int | rgb2hsv (float rgb[3], float hsv[3]) |
|
static int | hsv2rgb (float hsv[3], float rgb[3]) |
|
Definition at line 29 of file TFInterpolator.h.
◆ type
Enumerator |
---|
linear | |
discrete | |
logarithm | |
exponential | |
diverging | |
linearRGB | |
linearLAB | |
linearLCH | |
Definition at line 34 of file TFInterpolator.h.
◆ ~TFInterpolator()
VAPoR::TFInterpolator::~TFInterpolator |
( |
| ) |
|
◆ adjustHue()
static float VAPoR::TFInterpolator::adjustHue |
( |
float |
m1, |
|
|
float |
s1, |
|
|
float |
h1, |
|
|
float |
m2 |
|
) |
| |
|
static |
A function to provide an adjusted hue when interpolating to an unsaturated color in Msh space
- Parameters
-
[in] | Input | M value to adjust hue to |
[in] | Input | s value to adjust hue to |
[in] | Input | h value to adjust hue to |
[in] | Second | input M value to adjust hue to |
[out] | Adjusted | hue value |
◆ correctiveDivergentInterpolation()
static void VAPoR::TFInterpolator::correctiveDivergentInterpolation |
( |
float |
rgb1[3], |
|
|
float |
rgb2[3], |
|
|
float |
output[3], |
|
|
float |
interp |
|
) |
| |
|
static |
Interpolation algorithm that applies a corrective white space between two saturated color control points
- Parameters
-
[in] | RGB1 | Start point color for diverging color map |
[in] | RGB2 | End point color for diverging color map. |
[in] | The | output interpolated RGB value in the divergent map |
[in] | The | interpolation weight of the current color in the color map |
[in] | Set | whether we insert white space between two saturated color control points |
◆ divergentInterpolation()
static int VAPoR::TFInterpolator::divergentInterpolation |
( |
float |
rgb1[3], |
|
|
float |
rgb2[3], |
|
|
float |
output[3], |
|
|
float |
interp, |
|
|
bool |
corrective = false |
|
) |
| |
|
static |
Interpolation algorithm to generate a single interpolated color in a diverging color map.
- Parameters
-
[in] | RGB1 | Start point color for diverging color map |
[in] | RGB2 | End point color for diverging color map. |
[in] | The | output interpolated RGB value in the divergent map |
[in] | The | interpolation weight of the current color in the color map |
[in] | Set | whether we insert white space between two saturated color control points |
- Return values
-
Return | status, 1 = success |
◆ genDivergentMap()
static float * VAPoR::TFInterpolator::genDivergentMap |
( |
float |
rgb1[3], |
|
|
float |
rgb2[3], |
|
|
int |
numColors |
|
) |
| |
|
static |
Generate the complete diverging color map using the Moreland technique from RGB1 to RGB2, placing "white" in the middle. The number of points given by the "numColors" variable controls the resolution of the color map.
- Parameters
-
[in] | RGB1 | Start point color for diverging color map. |
[in] | RGB2 | End point color for diverging color map. |
[in] | Number | of colors to generate in the new color map. |
- Return values
-
Return | status, 1 = success |
◆ hsv2rgb()
static int VAPoR::TFInterpolator::hsv2rgb |
( |
float |
hsv[3], |
|
|
float |
rgb[3] |
|
) |
| |
|
static |
◆ interpCirc()
static float VAPoR::TFInterpolator::interpCirc |
( |
type |
t, |
|
|
float |
leftVal, |
|
|
float |
rightVal, |
|
|
float |
r |
|
) |
| |
|
static |
◆ interpolate()
static float VAPoR::TFInterpolator::interpolate |
( |
type |
, |
|
|
float |
leftVal, |
|
|
float |
rightVal, |
|
|
float |
r |
|
) |
| |
|
static |
◆ lab2msh()
static int VAPoR::TFInterpolator::lab2msh |
( |
float |
lab[3], |
|
|
float |
msh[3] |
|
) |
| |
|
static |
Conversion from Lab to Msh
- Parameters
-
[in] | A | 3-tuple color in rgb space |
[in] | The | resultant 3-tuple color in Msh space |
- Return values
-
Return | status, 1 = success |
◆ lab2srgb()
static int VAPoR::TFInterpolator::lab2srgb |
( |
float |
lab[3], |
|
|
float |
rgb[3] |
|
) |
| |
|
static |
Conversion of Lab to RGB
- Parameters
-
[in] | A | 3-tuple color in Lab space |
[in] | The | resultant 3-tuple color in rgb space |
- Return values
-
Return | status, 1 = success |
◆ msh2lab()
static int VAPoR::TFInterpolator::msh2lab |
( |
float |
msh[3], |
|
|
float |
lab[3] |
|
) |
| |
|
static |
Conversion of Msh to Lab
- Parameters
-
[in] | A | 3-tuple color in Msh space |
[in] | The | resultant 3-tuple color in Lab space |
- Return values
-
Return | status, 1 = success |
◆ msh2srgb()
static int VAPoR::TFInterpolator::msh2srgb |
( |
float |
msh[3], |
|
|
float |
rgb[3] |
|
) |
| |
|
static |
Conversion of Msh to RGB
- Parameters
-
[in] | A | 3-tuple color in Msg space |
[in] | The | resultant 3-tuple color in rgb space |
- Return values
-
Return | status, 1 = success |
◆ rgb2hsv()
static int VAPoR::TFInterpolator::rgb2hsv |
( |
float |
rgb[3], |
|
|
float |
hsv[3] |
|
) |
| |
|
static |
◆ rgb2srgb()
static int VAPoR::TFInterpolator::rgb2srgb |
( |
float |
rgb[3], |
|
|
float |
srgb[3] |
|
) |
| |
|
static |
Convert an RGB tuple to sRGB
- Parameters
-
[in] | A | 3-tuple color in rgb space |
[in] | The | resultant 3-tuple color in sRGB space |
- Return values
-
Return | status, 1 = success |
◆ srgb2lab()
static int VAPoR::TFInterpolator::srgb2lab |
( |
float |
rgb[3], |
|
|
float |
lab[3] |
|
) |
| |
|
static |
Conversion from RGB to Lab
- Parameters
-
[in] | A | 3-tuple color in rgb space |
[in] | The | resultant 3-tuple color in Lab space |
- Return values
-
Return | status, 1 = success |
◆ srgb2msh()
static int VAPoR::TFInterpolator::srgb2msh |
( |
float |
rgb[3], |
|
|
float |
msh[3] |
|
) |
| |
|
static |
Conversion from RGB to Msh
- Parameters
-
[in] | A | 3-tuple color in rgb space |
[in] | The | resultant 3-tuple color in Msh space |
- Return values
-
Return | status, 1 = success |
◆ srgb2rgb()
static int VAPoR::TFInterpolator::srgb2rgb |
( |
float |
srgb[3], |
|
|
float |
rgb[3] |
|
) |
| |
|
static |
Convert an sRGB tuple to RGB
- Parameters
-
[in] | A | 3-tuple color in sRGB space |
[in] | The | resultant 3-tuple color in RGB space |
- Return values
-
Return | status, 1 = success |
◆ srgb2xyz()
static int VAPoR::TFInterpolator::srgb2xyz |
( |
float |
rgb[3], |
|
|
float |
xyz[3] |
|
) |
| |
|
static |
Conversion from Lab to Msh
- Parameters
-
[in] | A | 3-tuple color in rgb space |
[in] | The | resultant 3-tuple color in xyz space |
- Return values
-
Return | status, 1 = success |
◆ xyz2srgb()
static int VAPoR::TFInterpolator::xyz2srgb |
( |
float |
xyz[3], |
|
|
float |
rgb[3] |
|
) |
| |
|
static |
Conversion from xyz to rgb
- Parameters
-
[in] | A | 3-tuple color in xyz space |
[in] | The | resultant 3-tuple color in rgb space |
- Return values
-
Return | status, 1 = success |
◆ colorMap
float* VAPoR::TFInterpolator::colorMap |
|
static |
◆ Xn
float VAPoR::TFInterpolator::Xn |
|
static |
◆ XYZinverseMatrix
float VAPoR::TFInterpolator::XYZinverseMatrix[9] |
|
static |
◆ XYZtransferMatrix
float VAPoR::TFInterpolator::XYZtransferMatrix[9] |
|
static |
◆ Yn
float VAPoR::TFInterpolator::Yn |
|
static |
◆ Zn
float VAPoR::TFInterpolator::Zn |
|
static |
The documentation for this class was generated from the following file: