VTK  9.0.1
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 
49 #ifndef vtkColorSeries_h
50 #define vtkColorSeries_h
51 
52 #include "vtkColor.h" // Needed for vtkColor[34]ub
53 #include "vtkCommonColorModule.h" // For export macro
54 #include "vtkObject.h"
55 #include "vtkStdString.h" // Needed for arguments
56 
57 class vtkLookupTable;
58 
59 class VTKCOMMONCOLOR_EXPORT vtkColorSeries : public vtkObject
60 {
61 public:
62  vtkTypeMacro(vtkColorSeries, vtkObject);
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
68  static vtkColorSeries* New();
69 
74  {
76  SPECTRUM = 0,
200  CUSTOM
201  };
202 
208  enum LUTMode
209  {
211  ORDINAL = 0,
213  CATEGORICAL
214  };
215 
217 
224  virtual void SetColorScheme(int scheme);
225  virtual int SetColorSchemeByName(const vtkStdString& schemeName);
227 
231  int GetNumberOfColorSchemes() const;
232 
236  virtual vtkStdString GetColorSchemeName() const;
237 
241  virtual void SetColorSchemeName(const vtkStdString& scheme);
242 
246  virtual int GetColorScheme() const;
247 
251  virtual int GetNumberOfColors() const;
252 
258  virtual void SetNumberOfColors(int numColors);
259 
264  vtkColor3ub GetColor(int index) const;
265 
270  vtkColor3ub GetColorRepeating(int index) const;
271 
276  virtual void SetColor(int index, const vtkColor3ub& color);
277 
281  virtual void AddColor(const vtkColor3ub& color);
282 
286  virtual void InsertColor(int index, const vtkColor3ub& color);
287 
291  virtual void RemoveColor(int index);
292 
296  virtual void ClearColors();
297 
301  virtual void DeepCopy(vtkColorSeries* chartColors);
302 
310  void BuildLookupTable(vtkLookupTable* lkup, int lutIndexing = CATEGORICAL);
311 
322  vtkLookupTable* CreateLookupTable(int lutIndexing = CATEGORICAL);
323 
324 protected:
325  vtkColorSeries();
326  ~vtkColorSeries() override;
327 
332  virtual void CopyOnWrite();
333 
335 
338  class Private;
339  Private* Storage;
341 
346 
349 
350 private:
351  vtkColorSeries(const vtkColorSeries&) = delete;
352  void operator=(const vtkColorSeries&) = delete;
353 };
354 
355 #endif // vtkColorSeries_h
purple-grey-orange diverging ColorBrewer scheme (8 colors)
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
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:62
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:33
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).