casa
5.7.0-16
|
#include <ColormapDefinition.h>
Public Types | |
typedef std::map < casacore::String, bool > | colormapnamemap |
Return the names of the built-in colormaps. More... | |
Public Member Functions | |
ColormapDefinition () | |
Construct a single color (white) Colormap. More... | |
ColormapDefinition (const casacore::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. More... | |
ColormapDefinition (const casacore::String &mapName, const casacore::Vector< casacore::Float > &reds, const casacore::Vector< casacore::Float > &greens, const casacore::Vector< casacore::Float > &blues) | |
Construct a new Colormap, using the supplied name and component vectors. More... | |
void | getValue (const casacore::Float t, casacore::Float &red, casacore::Float &green, casacore::Float &blue) const |
Obtain the Colormap value for the "index" value 0 <= t <= 1 More... | |
void | setValues (const casacore::Vector< casacore::Float > &reds, const casacore::Vector< casacore::Float > &greens, const casacore::Vector< casacore::Float > &blues) |
Change the Colormap values with the provided component vectors. More... | |
casacore::Bool | save (const casacore::String &fullPathName, const casacore::Vector< casacore::String > &synonyms, const casacore::Bool &overwrite=true) const |
Write this ColormapDefinition to the named casacore::Table in the named directory (default values are obtained from the user's .aipsrc file. More... | |
casacore::Bool | loadColormap (const casacore::String &name) |
Load Colormap definitions for a specified colormapname More... | |
casacore::Bool | loadBuiltinColormap (const casacore::String &name) |
Static Public Member Functions | |
static colormapnamemap | builtinColormapNames (casacore::Bool uniqueonly=true) |
static void | shutdown () |
Private Member Functions | |
casacore::Bool | queryColormapTable (const casacore::Table &table, const casacore::String &name) |
Utility function to look if a colormap name is in a Table. More... | |
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 More... | |
Private Attributes | |
casacore::String | itsName |
The name of this ColormapDefinition. More... | |
casacore::Vector< casacore::Float > | itsReds |
The Color component vectors for this ColormapDefinition. More... | |
casacore::Vector< casacore::Float > | itsGreens |
casacore::Vector< casacore::Float > | itsBlues |
Static Private Attributes | |
static casacore::String | ourDefaultColormap |
The loaded colormaps (a replacement for the builtins) More... | |
static std::shared_ptr < casacore::Table > | ourDefaultColormapTable |
static std::shared_ptr < casacore::Table > | ourUserColormapTable |
static casacore::String | ourTableVersion |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ColormapDefinition &pcreh) |
Write a ColormapDefinition to an ostream in a simple text form. More... | |
Definition at line 126 of file ColormapDefinition.h.
typedef std::map<casacore::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 174 of file ColormapDefinition.h.
casa::ColormapDefinition::ColormapDefinition | ( | ) |
Construct a single color (white) Colormap.
|
explicit |
casa::ColormapDefinition::ColormapDefinition | ( | const casacore::String & | mapName, |
const casacore::Vector< casacore::Float > & | reds, | ||
const casacore::Vector< casacore::Float > & | greens, | ||
const casacore::Vector< casacore::Float > & | blues | ||
) |
Construct a new Colormap, using the supplied name and component vectors.
|
static |
void casa::ColormapDefinition::getValue | ( | const casacore::Float | t, |
casacore::Float & | red, | ||
casacore::Float & | green, | ||
casacore::Float & | blue | ||
) | const |
Obtain the Colormap value for the "index" value 0 <= t <= 1
casacore::Bool casa::ColormapDefinition::loadBuiltinColormap | ( | const casacore::String & | name | ) |
casacore::Bool casa::ColormapDefinition::loadColormap | ( | const casacore::String & | name | ) |
Load Colormap definitions for a specified colormapname
|
staticprivate |
load ColormapDefinitions from default location aips++/data/colormaps/default.tbl and/or location specified in display.colormaps.usertable
|
private |
Utility function to look if a colormap name is in a Table.
casacore::Bool casa::ColormapDefinition::save | ( | const casacore::String & | fullPathName, |
const casacore::Vector< casacore::String > & | synonyms, | ||
const casacore::Bool & | overwrite = true |
||
) | const |
Write this ColormapDefinition to the named casacore::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 casacore::Table will be over-written. If the named casacore::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 casacore::Float array of dim n GREEN
a casacore::Float array of dim n BLUE
a casacore::Float array of dim n SYNONYMS
a casacore::String array of dim m
void casa::ColormapDefinition::setValues | ( | const casacore::Vector< casacore::Float > & | reds, |
const casacore::Vector< casacore::Float > & | greens, | ||
const casacore::Vector< casacore::Float > & | blues | ||
) |
Change the Colormap values with the provided component vectors.
|
inlinestatic |
Definition at line 185 of file ColormapDefinition.h.
References ourDefaultColormapTable, and ourUserColormapTable.
|
friend |
Write a ColormapDefinition to an ostream in a simple text form.
|
private |
Definition at line 214 of file ColormapDefinition.h.
|
private |
Definition at line 213 of file ColormapDefinition.h.
|
private |
The name of this ColormapDefinition.
Definition at line 193 of file ColormapDefinition.h.
|
private |
The Color component vectors for this ColormapDefinition.
Definition at line 212 of file ColormapDefinition.h.
|
staticprivate |
The loaded colormaps (a replacement for the builtins)
Definition at line 205 of file ColormapDefinition.h.
|
staticprivate |
Definition at line 206 of file ColormapDefinition.h.
Referenced by shutdown().
|
staticprivate |
Definition at line 208 of file ColormapDefinition.h.
|
staticprivate |
Definition at line 207 of file ColormapDefinition.h.
Referenced by shutdown().