VTK
vtkColorSeries.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkColorSeries.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
44 #ifndef vtkColorSeries_h
45 #define vtkColorSeries_h
46 
47 #include "vtkCommonColorModule.h" // For export macro
48 #include "vtkObject.h"
49 #include "vtkColor.h" // Needed for vtkColor[34]ub
50 #include "vtkStdString.h" // Needed for arguments
51 
52 class vtkLookupTable;
53 
54 class VTKCOMMONCOLOR_EXPORT vtkColorSeries : public vtkObject
55 {
56 public:
57  vtkTypeMacro(vtkColorSeries, vtkObject);
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
63  static vtkColorSeries* New();
64 
68  enum ColorSchemes {
70  SPECTRUM = 0,
194  CUSTOM
195  };
196 
202 enum LUTMode {
204  ORDINAL = 0,
206  CATEGORICAL
207 };
208 
210 
217  virtual void SetColorScheme(int scheme);
218  virtual int SetColorSchemeByName(const vtkStdString& schemeName);
220 
224  int GetNumberOfColorSchemes() const;
225 
229  virtual vtkStdString GetColorSchemeName() const;
230 
234  virtual void SetColorSchemeName(const vtkStdString& scheme);
235 
239  virtual int GetColorScheme() const;
240 
244  virtual int GetNumberOfColors() const;
245 
251  virtual void SetNumberOfColors(int numColors);
252 
257  vtkColor3ub GetColor(int index) const;
258 
263  vtkColor3ub GetColorRepeating(int index) const;
264 
269  virtual void SetColor(int index, const vtkColor3ub &color);
270 
274  virtual void AddColor(const vtkColor3ub &color);
275 
279  virtual void InsertColor(int index, const vtkColor3ub &color);
280 
284  virtual void RemoveColor(int index);
285 
289  virtual void ClearColors();
290 
294  virtual void DeepCopy(vtkColorSeries *chartColors);
295 
303  void BuildLookupTable(vtkLookupTable* lkup, int lutIndexing = CATEGORICAL);
304 
315  vtkLookupTable* CreateLookupTable(int lutIndexing = CATEGORICAL);
316 
317 protected:
318  vtkColorSeries();
319  ~vtkColorSeries() override;
320 
325  virtual void CopyOnWrite();
326 
328 
331  class Private;
332  Private* Storage;
334 
339 
342 
343 private:
344  vtkColorSeries(const vtkColorSeries &) = delete;
345  void operator=(const vtkColorSeries &) = delete;
346 
347 };
348 
349 #endif //vtkColorSeries_h
purple-grey-orange diverging ColorBrewer scheme (8 colors)
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:40
diverging spectral ColorBrewer scheme (4 colors)
blue to green sequential ColorBrewer scheme (5 colors)
diverging spectral ColorBrewer scheme (5 colors)
brown-blue-green diverging ColorBrewer scheme (5 colors)
a qualitative ColorBrewer scheme useful for color set members
yellow-orange-brown sequential ColorBrewer scheme (7 colors)
a qualitative ColorBrewer scheme useful for color set members
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
yellow-orange-brown sequential ColorBrewer scheme (8 colors)
7 different blues.
diverging spectral ColorBrewer scheme (3 colors)
blue to green sequential ColorBrewer scheme (4 colors)
7 cool colors (green to purple).
brown-blue-green diverging ColorBrewer scheme (3 colors)
yellow-orange-brown sequential ColorBrewer scheme (3 colors)
blue to purple sequential ColorBrewer scheme (5 colors)
blue to purple sequential ColorBrewer scheme (7 colors)
ColorSchemes
Enum of the available color schemes.
map scalar values into colors via a lookup table
purple-grey-orange diverging ColorBrewer scheme (9 colors)
blue to green sequential ColorBrewer scheme (6 colors)
a qualitative ColorBrewer scheme composed of pastel colors
brown-blue-green diverging ColorBrewer scheme (7 colors)
brown-blue-green diverging ColorBrewer scheme (6 colors)
brown-blue-green diverging ColorBrewer scheme (4 colors)
purple-grey-orange diverging ColorBrewer scheme (5 colors)
yellow-orange-brown sequential ColorBrewer scheme (9 colors)
brown-blue-green diverging ColorBrewer scheme (8 colors)
int ColorScheme
The color scheme being used.
diverging spectral ColorBrewer scheme (7 colors)
purple-grey-orange diverging ColorBrewer scheme (11 colors)
purple-grey-orange diverging ColorBrewer scheme (6 colors)
blue to purple sequential ColorBrewer scheme (3 colors)
yellow-orange-brown sequential ColorBrewer scheme (5 colors)
purple-grey-orange diverging ColorBrewer scheme (4 colors)
brown-blue-green diverging ColorBrewer scheme (10 colors)
Some derived classes for the different colors commonly used.
Definition: vtkColor.h:194
blue to purple sequential ColorBrewer scheme (8 colors)
a simple class to control print indentation
Definition: vtkIndent.h:39
a qualitative ColorBrewer scheme useful for color set members
yellow-orange-brown sequential ColorBrewer scheme (6 colors)
blue to green sequential ColorBrewer scheme (3 colors)
7 colors from blue to magenta.
a qualitative ColorBrewer scheme with pairs of matching colors
purple-grey-orange diverging ColorBrewer scheme (10 colors)
a dark set of qualitative colors from ColorBrewer
blue to green sequential ColorBrewer scheme (9 colors)
LUTMode
An enum defining how lookup tables should be used: either as a list of discrete colors to choose from...
#define VTK_NEWINSTANCE
purple-grey-orange diverging ColorBrewer scheme (7 colors)
qualitative ColorBrewer scheme good for accenting
brown-blue-green diverging ColorBrewer scheme (11 colors)
diverging spectral ColorBrewer scheme (11 colors)
brown-blue-green diverging ColorBrewer scheme (9 colors)
vtkStdString ColorSchemeName
The color scheme being used.
blue to green sequential ColorBrewer scheme (7 colors)
stores a list of colors.
a qualitative ColorBrewer scheme composed of pastel colors
blue to purple sequential ColorBrewer scheme (6 colors)
purple-grey-orange diverging ColorBrewer scheme (3 colors)
blue to green sequential ColorBrewer scheme (8 colors)
6 colors from green to orange.
diverging spectral ColorBrewer scheme (9 colors)
blue to purple sequential ColorBrewer scheme (9 colors)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Private * Storage
diverging spectral ColorBrewer scheme (6 colors)
yellow-orange-brown sequential ColorBrewer scheme (4 colors)
blue to purple sequential ColorBrewer scheme (4 colors)
diverging spectral ColorBrewer scheme (10 colors)
diverging spectral ColorBrewer scheme (8 colors)
6 warm colors (red to yellow).