casa
$Rev:20696$
|
#include <ColormapDefinition.h>
Public Types | |
typedef std::map< String, bool > | colormapnamemap |
Return the names of the built-in colormaps. | |
Public Member Functions | |
ColormapDefinition () | |
Construct a single color (white) Colormap. | |
ColormapDefinition (const String &mapName) | |
Construct the known Colormap mapName , first looking for a saved Colormap having this name, then resorting to a built-in Colormap, and if that doesn't exist, throw an error. | |
ColormapDefinition (const String &mapName, const Vector< Float > &reds, const Vector< Float > &greens, const Vector< Float > &blues) | |
Construct a new Colormap, using the supplied name and component vectors. | |
void | getValue (const Float t, Float &red, Float &green, Float &blue) const |
Obtain the Colormap value for the "index" value 0 <= t <= 1 | |
void | setValues (const Vector< Float > &reds, const Vector< Float > &greens, const Vector< Float > &blues) |
Change the Colormap values with the provided component vectors. | |
Bool | save (const String &fullPathName, const Vector< String > &synonyms, const Bool &overwrite=True) const |
Write this ColormapDefinition to the named Table in the named directory (default values are obtained from the user's .aipsrc file. | |
Bool | loadColormap (const String &name) |
Load Colormap definitions for a specified colormapname | |
Bool | loadBuiltinColormap (const String &name) |
Static Public Member Functions | |
static colormapnamemap | builtinColormapNames (Bool uniqueonly=True) |
Private Member Functions | |
Bool | queryColormapTable (const Table &table, const String &name) |
Utility function to look if a colormap name is in a Table. | |
Static Private Member Functions | |
static void | loadColormapTable () |
load ColormapDefinitions from default location aips++/data/colormaps/default.tbl and/or location specified in display.colormaps.usertable | |
Private Attributes | |
String | itsName |
The name of this ColormapDefinition. | |
Vector< Float > | itsReds |
The Color component vectors for this ColormapDefinition. | |
Vector< Float > | itsGreens |
Vector< Float > | itsBlues |
Static Private Attributes | |
static String | ourDefaultColormap |
The loaded colormaps (a replacement for the builtins) | |
static Table | ourDefaultColormapTable |
static Table | ourUserColormapTable |
static String | ourTableVersion |
Friends | |
ostream & | operator<< (ostream &os, const ColormapDefinition &pcreh) |
Write a ColormapDefinition to an ostream in a simple text form. |
Definition at line 122 of file ColormapDefinition.h.
typedef std::map<String,bool> casa::ColormapDefinition::colormapnamemap |
Return the names of the built-in colormaps.
If uniqueonly
is True (default), only the names of the unique colormaps are returned, otherwise all colormap names are returned.
Definition at line 170 of file ColormapDefinition.h.
Construct a single color (white) Colormap.
casa::ColormapDefinition::ColormapDefinition | ( | const String & | mapName | ) | [explicit] |
casa::ColormapDefinition::ColormapDefinition | ( | const String & | mapName, |
const Vector< Float > & | reds, | ||
const Vector< Float > & | greens, | ||
const Vector< Float > & | blues | ||
) |
Construct a new Colormap, using the supplied name and component vectors.
static colormapnamemap casa::ColormapDefinition::builtinColormapNames | ( | Bool | uniqueonly = True | ) | [static] |
void casa::ColormapDefinition::getValue | ( | const Float | t, |
Float & | red, | ||
Float & | green, | ||
Float & | blue | ||
) | const |
Obtain the Colormap value for the "index" value 0 <= t <= 1
Bool casa::ColormapDefinition::loadBuiltinColormap | ( | const String & | name | ) |
Bool casa::ColormapDefinition::loadColormap | ( | const String & | name | ) |
Load Colormap definitions for a specified colormapname
static void casa::ColormapDefinition::loadColormapTable | ( | ) | [static, private] |
load ColormapDefinitions from default location aips++/data/colormaps/default.tbl and/or location specified in display.colormaps.usertable
Bool casa::ColormapDefinition::queryColormapTable | ( | const Table & | table, |
const String & | name | ||
) | [private] |
Utility function to look if a colormap name is in a Table.
Bool casa::ColormapDefinition::save | ( | const String & | fullPathName, |
const Vector< String > & | synonyms, | ||
const Bool & | overwrite = True |
||
) | const |
Write this ColormapDefinition to the named Table in the named directory (default values are obtained from the user's .aipsrc
file.
If overwrite
is True
, then an existing map of the same name in the Table will be over-written. If the named Table does not exist, it will be created.
The table format has to conform with following scheme. It must have five columns: CMAP_NAME
a String RED
a Float array of dim n GREEN
a Float array of dim n BLUE
a Float array of dim n SYNONYMS
a String array of dim m
void casa::ColormapDefinition::setValues | ( | const Vector< Float > & | reds, |
const Vector< Float > & | greens, | ||
const Vector< Float > & | blues | ||
) |
Change the Colormap values with the provided component vectors.
ostream& operator<< | ( | ostream & | os, |
const ColormapDefinition & | pcreh | ||
) | [friend] |
Write a ColormapDefinition to an ostream in a simple text form.
Vector<Float> casa::ColormapDefinition::itsBlues [private] |
Definition at line 205 of file ColormapDefinition.h.
Vector<Float> casa::ColormapDefinition::itsGreens [private] |
Definition at line 204 of file ColormapDefinition.h.
String casa::ColormapDefinition::itsName [private] |
The name of this ColormapDefinition.
Definition at line 184 of file ColormapDefinition.h.
Vector<Float> casa::ColormapDefinition::itsReds [private] |
The Color component vectors for this ColormapDefinition.
Definition at line 203 of file ColormapDefinition.h.
String casa::ColormapDefinition::ourDefaultColormap [static, private] |
The loaded colormaps (a replacement for the builtins)
Definition at line 196 of file ColormapDefinition.h.
Table casa::ColormapDefinition::ourDefaultColormapTable [static, private] |
Definition at line 197 of file ColormapDefinition.h.
String casa::ColormapDefinition::ourTableVersion [static, private] |
Definition at line 199 of file ColormapDefinition.h.
Table casa::ColormapDefinition::ourUserColormapTable [static, private] |
Definition at line 198 of file ColormapDefinition.h.