MIRA
|
A class for creating formula based color maps. More...
#include <image/Colormap.h>
Public Types | |
typedef iterator | const_iterator |
Public Member Functions | |
FormulaeColormap (std::size_t size=256) | |
FormulaeColormap (int rformula, int gformula, int bformula, std::size_t size=256) | |
void | setFormulae (int rformula, int gformula, int bformula) |
Sets the formulae for the color components. More... | |
virtual Color::RGB | getf (float f) const |
Accesses the continuous colors. More... | |
void | resize (std::size_t pSize) |
Sets a certain size of this colormap. More... | |
virtual std::size_t | size () const |
Returns the set size. More... | |
virtual Color::RGB | get (std::size_t idx) const |
Returns the color at the specified index (must be >= 0 and < size) More... | |
Color::RGB | operator() (std::size_t idx) |
Returns the color in the colormap at the given index. More... | |
Color::RGB | operator[] (std::size_t idx) |
Returns the color in the colormap at the given index. More... | |
iterator | begin () |
Gives an iterator to the beginning of the colormap. More... | |
const_iterator | begin () const |
Gives a const iterator to the beginning of the colormap. More... | |
iterator | end () |
Gives an iterator to the end of the colormap. More... | |
const_iterator | end () const |
Gives an const iterator to the end of the colormap. More... | |
Class const & | getClass () const |
call the virtual internalGetClass(). More... | |
Static Public Member Functions | |
static PseudoClass const & | CLASS () |
Protected Member Functions | |
virtual Class const & | internalGetClass () const =0 |
A class for creating formula based color maps.
For each RGB color component a formula is given, that specifies, how the component is computed. The advantage of these color maps is, that most of the formulae are at least 2 times differentiable and therefore no changes in the color gradients are visible (which is the case in linear gradient color maps).
The following predefined formulas are available. They correspond to the rgbformulae of gnuplot:
0: 0 1: 0.5 2: 1 3: x 4: x^2 5: x^3 6: x^4 7: sqrt(x) 8: sqrt(sqrt(x)) 9: sin(90x) 10: cos(90x) 11: |x-0.5| 12: (2x-1)^2 13: sin(180x) 14: |cos(180x)| 15: sin(360x) 16: cos(360x) 17: |sin(360x)| 18: |cos(360x)| 19: |sin(720x)| 20: |cos(720x)| 21: 3x 22: 3x-1 23: 3x-2 24: |3x-1| 25: |3x-2| 26: (3x-1)/2 27: (3x-2)/2 28: |(3x-1)/2| 29: |(3x-2)/2| 30: x/0.32-0.78125 31: 2*x-0.84 32: 4x;1;-2x+1.84;x/0.08-11.5 33: |2*x - 0.5| 34: 2*x 35: 2*x - 0.5 36: 2*x - 1
|
inherited |
|
inline |
|
inline |
|
inline |
Sets the formulae for the color components.
|
virtualinherited |
Accesses the continuous colors.
The specified floating point value must be within the interval [0,1].
Implements ContinuousColormap.
|
inlineinherited |
Sets a certain size of this colormap.
|
inlinevirtualinherited |
Returns the set size.
Implements Colormap.
|
inlinevirtualinherited |
Returns the color at the specified index (must be >= 0 and < size)
Implements Colormap.
|
inlineinherited |
Returns the color in the colormap at the given index.
|
inlineinherited |
Returns the color in the colormap at the given index.
|
inlineinherited |
Gives an iterator to the beginning of the colormap.
|
inlineinherited |
Gives a const iterator to the beginning of the colormap.
|
inlineinherited |
Gives an iterator to the end of the colormap.
|
inlineinherited |
Gives an const iterator to the end of the colormap.
|
inlineinherited |
call the virtual internalGetClass().
|
inlinestaticinherited |
|
protectedpure virtualinherited |