Core 1.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
AnalyticPalette Class Reference

Procedurally defined palettes. More...

#include <palette.h>

Inheritance diagram for AnalyticPalette:
GenericPalette

Public Member Functions

 AnalyticPalette (int=0, bool=false)
 Create a palette. More...
 
virtual Color GetColor (double) const
 Compute the color. More...
 
AnalyticPalette Reversed () const
 Return the reversed palette.
 
- Public Member Functions inherited from GenericPalette
virtual Color GetColor (const double &) const
 Compute the color. More...
 
virtual QImage Draw (int=32, int=1024) const
 Draws an image with the colors of the palette. More...
 
virtual QImage CreateImage (int, int=16, bool=false) const
 Create an image form a palette. More...
 

Static Public Member Functions

static Color BrownGreyGreen (double)
 Custom divergent palette. More...
 
static Color GreenBrownGrey (double)
 Green to brown coloring. More...
 
static Color CoolWarm (double)
 Diverging palette from blue to red. More...
 
static Color MatlabJet (double)
 Equivalent of the Jet coloring in Matlab. More...
 
static Color BlueGreen (double)
 Blue to green smooth palette. More...
 
static Color WhiteRed (double)
 White to red. More...
 
static Color BlueGreyBrown (double)
 Custom divergent palette. More...
 
static Color GeologyGreenYellow (double)
 Custom divergent palette. More...
 
static Color GeologyGreenYellow2 (double)
 Custom divergent palette. More...
 
static Color BrownGreen (double)
 Diverging palette from brown to green.
 
static Color WhiteBlue (double)
 White to blue. More...
 

Protected Attributes

int n = 0
 Palette identifier.
 
bool r = false
 Reverse flag.
 

Detailed Description

Procedurally defined palettes.

Palette entries are as follows: 0 Brown-Grey-Green

1 Green-Brown-Grey

2 Matlab Jet

3 Cool-Warm

4 White-Red

5 Blue-Green

6 Blue-Grey-Brown

7-8 Green-Yellow variants

9 Brown-Green

10 White-Blue

Constructor & Destructor Documentation

◆ AnalyticPalette()

AnalyticPalette::AnalyticPalette ( int  n = 0,
bool  r = false 
)
explicit

Create a palette.

Parameters
nPalette identifier.
rReverse flag.

Member Function Documentation

◆ BlueGreen()

Color AnalyticPalette::BlueGreen ( double  u)
static

Blue to green smooth palette.

Parameters
uPalette entry.

◆ BlueGreyBrown()

Color AnalyticPalette::BlueGreyBrown ( double  u)
static

Custom divergent palette.

Inspired by Kenneth Moreland's diverging color map.

Compute a linear interpolation between blue, grey, and brown.

Parameters
uInterpolant.

◆ BrownGreyGreen()

Color AnalyticPalette::BrownGreyGreen ( double  u)
static

Custom divergent palette.

Compute a linear interpolation between brown, grey and green.

Parameters
uInterpolant.

◆ CoolWarm()

Color AnalyticPalette::CoolWarm ( double  u)
static

Diverging palette from blue to red.

Parameters
uPalette entry.

◆ GeologyGreenYellow()

Color AnalyticPalette::GeologyGreenYellow ( double  u)
static

Custom divergent palette.

Parameters
uInterpolant.

◆ GeologyGreenYellow2()

Color AnalyticPalette::GeologyGreenYellow2 ( double  u)
static

Custom divergent palette.

Parameters
uInterpolant.

◆ GetColor()

Color AnalyticPalette::GetColor ( double  u) const
virtual

Compute the color.

Parameters
uPalette entry.

◆ GreenBrownGrey()

Color AnalyticPalette::GreenBrownGrey ( double  u)
static

Green to brown coloring.

Parameters
uPalette entry.

◆ MatlabJet()

Color AnalyticPalette::MatlabJet ( double  u)
static

Equivalent of the Jet coloring in Matlab.

Author
Mathieu Gaillard
Parameters
uPalette entry.

◆ WhiteBlue()

Color AnalyticPalette::WhiteBlue ( double  u)
static

White to blue.

Parameters
uPalette entry.

◆ WhiteRed()

Color AnalyticPalette::WhiteRed ( double  u)
static

White to red.

Parameters
uPalette entry.