VTK
|
stores a list of colors. More...
#include <vtkColorSeries.h>
stores a list of colors.
The vtkColorSeries stores palettes of colors. There are several default palettes (or schemes) available and functions to control several aspects of what colors are returned. In essence a color scheme is set and then the number of colors and individual color values may be requested.
It is also possible to add schemes beyond the default palettes. Whenever SetColorScheme is called with a string for which no palette already exists, a new, empty palette is created. You may then use SetNumberOfColors and SetColor to populate the palette. You may not extend default palettes by calling functions that alter a scheme; if called while a predefined palette is in use, they will create a new non-default scheme and populate it with the current palette before continuing.
The "Brewer" palettes are courtesy of Cynthia A. Brewer (Dept. of Geography, Pennsylvania State University) and present under the Apache License. See the source code for details.
Definition at line 53 of file vtkColorSeries.h.
typedef vtkObject vtkColorSeries::Superclass |
Reimplemented from vtkObject.
Definition at line 56 of file vtkColorSeries.h.
Enum of the available color schemes
Definition at line 65 of file vtkColorSeries.h.
An enum defining how lookup tables should be used: either as a list of discrete colors to choose from (categorical), or as an ordered list of color set - points to interpolate among (ordinal).
Definition at line 201 of file vtkColorSeries.h.
vtkColorSeries::vtkColorSeries | ( | ) | [protected] |
virtual vtkColorSeries::~vtkColorSeries | ( | ) | [protected, virtual] |
static int vtkColorSeries::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
virtual int vtkColorSeries::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
static vtkColorSeries* vtkColorSeries::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
virtual vtkObjectBase* vtkColorSeries::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
vtkColorSeries* vtkColorSeries::NewInstance | ( | ) | const |
Reimplemented from vtkObject.
virtual void vtkColorSeries::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
static vtkColorSeries* vtkColorSeries::New | ( | ) | [static] |
Create a new vtkColorSeries with the SPECTRUM color scheme.
Reimplemented from vtkObject.
virtual void vtkColorSeries::SetColorScheme | ( | int | scheme | ) | [virtual] |
Set the color scheme that should be used. The variant of this function that takes an integer should pass a number from those in the enum, or a value returned by the string variant. The variant that accepts a string returns the integer index of the resulting palette (whether it already existed or is newly-created).
virtual int vtkColorSeries::SetColorSchemeByName | ( | const vtkStdString & | schemeName | ) | [virtual] |
Set the color scheme that should be used. The variant of this function that takes an integer should pass a number from those in the enum, or a value returned by the string variant. The variant that accepts a string returns the integer index of the resulting palette (whether it already existed or is newly-created).
int vtkColorSeries::GetNumberOfColorSchemes | ( | ) | const |
Return the number of schemes currently defined.
virtual vtkStdString vtkColorSeries::GetColorSchemeName | ( | ) | const [virtual] |
Get the color scheme that is currently being used.
virtual void vtkColorSeries::SetColorSchemeName | ( | const vtkStdString & | scheme | ) | [virtual] |
Set the name of the current color scheme
virtual int vtkColorSeries::GetColorScheme | ( | ) | const [virtual] |
Return the ID of the color scheme currently in use.
virtual int vtkColorSeries::GetNumberOfColors | ( | ) | const [virtual] |
Get the number of colors available in the current color scheme.
virtual void vtkColorSeries::SetNumberOfColors | ( | int | numColors | ) | [virtual] |
Set the number of colors to be stored in a non-default color scheme. Calling this function on a predefined color scheme will cause the scheme to be duplicated to a new custom scheme.
vtkColor3ub vtkColorSeries::GetColor | ( | int | index | ) | const |
Get the color at the specified index. If the index is out of range then black will be returned.
vtkColor3ub vtkColorSeries::GetColorRepeating | ( | int | index | ) | const |
Get the color at the specified index. If the index is out of range then the call wraps around, i.e. uses the mod operator.
virtual void vtkColorSeries::SetColor | ( | int | index, |
const vtkColor3ub & | color | ||
) | [virtual] |
Set the color at the specified index. Does nothing if the index is out of range.
virtual void vtkColorSeries::AddColor | ( | const vtkColor3ub & | color | ) | [virtual] |
Adds the color to the end of the list.
virtual void vtkColorSeries::InsertColor | ( | int | index, |
const vtkColor3ub & | color | ||
) | [virtual] |
Inserts the color at the specified index in the list.
virtual void vtkColorSeries::RemoveColor | ( | int | index | ) | [virtual] |
Removes the color at the specified index in the list.
virtual void vtkColorSeries::ClearColors | ( | ) | [virtual] |
Clears the list of colors.
virtual void vtkColorSeries::DeepCopy | ( | vtkColorSeries * | chartColors | ) | [virtual] |
Make a deep copy of the supplied object.
void vtkColorSeries::BuildLookupTable | ( | vtkLookupTable * | lkup, |
int | lutIndexing = CATEGORICAL |
||
) |
Populate a lookup table with all the colors in the current scheme. The default behavior is to return categorical data. Set lutIndexing to ORDINAL to return ordinal data. Any other value for lutIndexing is treated as CATEGORICAL.
vtkLookupTable* vtkColorSeries::CreateLookupTable | ( | int | lutIndexing = CATEGORICAL | ) |
Create a new lookup table with all the colors in the current scheme. The caller is responsible for deleting the table after use. The default behavior is to return categorical data. Set lutIndexing to ORDINAL to return ordinal data. Any other value for lutIndexing is treated as CATEGORICAL.
virtual void vtkColorSeries::CopyOnWrite | ( | ) | [protected, virtual] |
If the current scheme is a predefined (read-only) scheme, copy the current colors to a new scheme and modify the new scheme instead.
Private* vtkColorSeries::Storage [protected] |
Definition at line 295 of file vtkColorSeries.h.
int vtkColorSeries::ColorScheme [protected] |
The color scheme being used.
Definition at line 300 of file vtkColorSeries.h.
vtkStdString vtkColorSeries::ColorSchemeName [protected] |
The color scheme being used.
Definition at line 303 of file vtkColorSeries.h.