VAPOR3 3.9.4
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
VAPoR::TFInterpolator Class Reference

#include <TFInterpolator.h>

Public Types

enum  type {
  linear , discrete , logarithm , exponential ,
  diverging , linearRGB , linearLAB , linearLCH
}
 

Public Member Functions

 ~TFInterpolator ()
 

Static Public Member Functions

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])
 

Static Public Attributes

static float Xn
 
static float Yn
 
static float Zn
 
static float XYZtransferMatrix [9]
 
static float XYZinverseMatrix [9]
 
static float * colorMap
 

Detailed Description

Definition at line 29 of file TFInterpolator.h.

Member Enumeration Documentation

◆ type

Enumerator
linear 
discrete 
logarithm 
exponential 
diverging 
linearRGB 
linearLAB 
linearLCH 

Definition at line 34 of file TFInterpolator.h.

Constructor & Destructor Documentation

◆ ~TFInterpolator()

VAPoR::TFInterpolator::~TFInterpolator ( )

Member Function Documentation

◆ 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]InputM value to adjust hue to
[in]Inputs value to adjust hue to
[in]Inputh value to adjust hue to
[in]Secondinput M value to adjust hue to
[out]Adjustedhue 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]RGB1Start point color for diverging color map
[in]RGB2End point color for diverging color map.
[in]Theoutput interpolated RGB value in the divergent map
[in]Theinterpolation weight of the current color in the color map
[in]Setwhether 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]RGB1Start point color for diverging color map
[in]RGB2End point color for diverging color map.
[in]Theoutput interpolated RGB value in the divergent map
[in]Theinterpolation weight of the current color in the color map
[in]Setwhether we insert white space between two saturated color control points
Return values
Returnstatus, 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]RGB1Start point color for diverging color map.
[in]RGB2End point color for diverging color map.
[in]Numberof colors to generate in the new color map.
Return values
Returnstatus, 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]A3-tuple color in rgb space
[in]Theresultant 3-tuple color in Msh space
Return values
Returnstatus, 1 = success

◆ lab2srgb()

static int VAPoR::TFInterpolator::lab2srgb ( float  lab[3],
float  rgb[3] 
)
static

Conversion of Lab to RGB

Parameters
[in]A3-tuple color in Lab space
[in]Theresultant 3-tuple color in rgb space
Return values
Returnstatus, 1 = success

◆ msh2lab()

static int VAPoR::TFInterpolator::msh2lab ( float  msh[3],
float  lab[3] 
)
static

Conversion of Msh to Lab

Parameters
[in]A3-tuple color in Msh space
[in]Theresultant 3-tuple color in Lab space
Return values
Returnstatus, 1 = success

◆ msh2srgb()

static int VAPoR::TFInterpolator::msh2srgb ( float  msh[3],
float  rgb[3] 
)
static

Conversion of Msh to RGB

Parameters
[in]A3-tuple color in Msg space
[in]Theresultant 3-tuple color in rgb space
Return values
Returnstatus, 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]A3-tuple color in rgb space
[in]Theresultant 3-tuple color in sRGB space
Return values
Returnstatus, 1 = success

◆ srgb2lab()

static int VAPoR::TFInterpolator::srgb2lab ( float  rgb[3],
float  lab[3] 
)
static

Conversion from RGB to Lab

Parameters
[in]A3-tuple color in rgb space
[in]Theresultant 3-tuple color in Lab space
Return values
Returnstatus, 1 = success

◆ srgb2msh()

static int VAPoR::TFInterpolator::srgb2msh ( float  rgb[3],
float  msh[3] 
)
static

Conversion from RGB to Msh

Parameters
[in]A3-tuple color in rgb space
[in]Theresultant 3-tuple color in Msh space
Return values
Returnstatus, 1 = success

◆ srgb2rgb()

static int VAPoR::TFInterpolator::srgb2rgb ( float  srgb[3],
float  rgb[3] 
)
static

Convert an sRGB tuple to RGB

Parameters
[in]A3-tuple color in sRGB space
[in]Theresultant 3-tuple color in RGB space
Return values
Returnstatus, 1 = success

◆ srgb2xyz()

static int VAPoR::TFInterpolator::srgb2xyz ( float  rgb[3],
float  xyz[3] 
)
static

Conversion from Lab to Msh

Parameters
[in]A3-tuple color in rgb space
[in]Theresultant 3-tuple color in xyz space
Return values
Returnstatus, 1 = success

◆ xyz2srgb()

static int VAPoR::TFInterpolator::xyz2srgb ( float  xyz[3],
float  rgb[3] 
)
static

Conversion from xyz to rgb

Parameters
[in]A3-tuple color in xyz space
[in]Theresultant 3-tuple color in rgb space
Return values
Returnstatus, 1 = success

Member Data Documentation

◆ colorMap

float* VAPoR::TFInterpolator::colorMap
static

Definition at line 166 of file TFInterpolator.h.

◆ Xn

float VAPoR::TFInterpolator::Xn
static

Definition at line 161 of file TFInterpolator.h.

◆ XYZinverseMatrix

float VAPoR::TFInterpolator::XYZinverseMatrix[9]
static

Definition at line 165 of file TFInterpolator.h.

◆ XYZtransferMatrix

float VAPoR::TFInterpolator::XYZtransferMatrix[9]
static

Definition at line 164 of file TFInterpolator.h.

◆ Yn

float VAPoR::TFInterpolator::Yn
static

Definition at line 162 of file TFInterpolator.h.

◆ Zn

float VAPoR::TFInterpolator::Zn
static

Definition at line 163 of file TFInterpolator.h.


The documentation for this class was generated from the following file: