#include <colorMap.h>
Public Member Functions | |
Constructors and Destructors | |
ColorMap () throw () | |
Default constructor. | |
ColorMap (Size color_number) throw () | |
Alternative constructor. | |
ColorMap (const ColorMap &color_Map) throw () | |
Copy constructor. | |
ColorMap (Size size, const ColorRGBA &color, bool alpha_blending=false) throw () | |
Detailed constructor. | |
ColorMap (const ColorMap &color_Map, Index from, Index to, bool alpha_blending=false) throw () | |
ColorMap (const ColorRGBA *color_array, Size array_size, bool alpha_blending=false) throw () | |
virtual | ~ColorMap () throw () |
Destructor. | |
Accessors | |
void | createMapJet (const Size color_number) throw () |
Create a colormap similar to the "jet" map of matlab. | |
void | setBaseColors (const ColorRGBA *color_array, Size array_size) throw () |
Set the base colors for the interpolation. | |
void | setNumberOfColors (const Size color_number) throw () |
Set the number of colors this Map should contain after interpolation. | |
Size | getNumberOfColors () const throw () |
Return the number of elements in our color Map. | |
void | setAlphaBlending (bool blending) throw () |
Decides if we should interpolate the alpha channel as well. | |
bool | getAlphaBlending () const throw () |
Returns true if the alpha channel is interpolated between colors, false otherwise. | |
Size | createMap () throw () |
Build the Map, i.e. | |
void | setMinMaxColors (ColorRGBA min, ColorRGBA max) throw () |
Sets the colors that are used for values below min and above max. | |
void | setRange (float min, float max) throw () |
Sets the range used for the mapping. | |
ColorRGBA & | map (float value) throw () |
Maps value into the color Map. | |
const ColorRGBA & | map (float value) const throw () |
Maps value into the color Map. | |
bool | setInterpolationBoundaries (const vector< Vector4 > &boundaries) throw () |
Set the interpolation boundary points. | |
Debugging and Diagnostics | |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Dump the content to an ostream. | |
Protected Attributes | |
Size | color_number_ |
bool | alpha_blending_ |
ColorRGBA | min_color_ |
ColorRGBA | max_color_ |
bool | has_min_max_colors_ |
float | min_ |
float | max_ |
vector< Vector4 > | interpolation_boundaries_ |
|
Default constructor. Create an empty instance of ColorMap. |
|
Alternative constructor. Create an instance of ColorMap.
|
|
Copy constructor. Create a copy of a ColorMap object.
|
|
Detailed constructor.
|
|
Destructor.
|
|
Build the Map, i.e. interpolate between the colors to obtain the desired number of colors. Returns the actual size of the Map after interpolation. |
|
Maps value into the color Map. (const method) |
|
Maps value into the color Map.
|
|
Set the interpolation boundary points. This allows different slopes in the interpolation of the R, G, B, and A components. The color vector must be initialized prior to this function. If the number of colors does not match the number of interpolation points we return false and do nothing. |
|
Sets the colors that are used for values below min and above max.
|
|
Sets the range used for the mapping.
|