VTK  9.2.6
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 
51 #ifndef vtkColorSeries_h
52 #define vtkColorSeries_h
53 
54 #include "vtkColor.h" // Needed for vtkColor[34]ub
55 #include "vtkCommonColorModule.h" // For export macro
56 #include "vtkObject.h"
57 #include "vtkStdString.h" // Needed for arguments
58 
59 class vtkLookupTable;
60 
61 class VTKCOMMONCOLOR_EXPORT vtkColorSeries : public vtkObject
62 {
63 public:
64  vtkTypeMacro(vtkColorSeries, vtkObject);
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
70  static vtkColorSeries* New();
71 
76  {
78  SPECTRUM = 0,
202  CUSTOM
203  };
204 
210  enum LUTMode
211  {
213  ORDINAL = 0,
215  CATEGORICAL
216  };
217 
219 
226  virtual void SetColorScheme(int scheme);
227  virtual int SetColorSchemeByName(const vtkStdString& schemeName);
229 
233  int GetNumberOfColorSchemes() const;
234 
238  virtual vtkStdString GetColorSchemeName() const;
239 
243  virtual void SetColorSchemeName(const vtkStdString& name);
244 
248  virtual int GetColorScheme() const;
249 
253  virtual int GetNumberOfColors() const;
254 
260  virtual void SetNumberOfColors(int numColors);
261 
266  vtkColor3ub GetColor(int index) const;
267 
272  vtkColor3ub GetColorRepeating(int index) const;
273 
278  virtual void SetColor(int index, const vtkColor3ub& color);
279 
283  virtual void AddColor(const vtkColor3ub& color);
284 
288  virtual void InsertColor(int index, const vtkColor3ub& color);
289 
293  virtual void RemoveColor(int index);
294 
298  virtual void ClearColors();
299 
303  virtual void DeepCopy(vtkColorSeries* chartColors);
304 
312  void BuildLookupTable(vtkLookupTable* lkup, int lutIndexing = CATEGORICAL);
313 
324  vtkLookupTable* CreateLookupTable(int lutIndexing = CATEGORICAL);
325 
326 protected:
327  vtkColorSeries();
328  ~vtkColorSeries() override;
329 
334  virtual void CopyOnWrite();
335 
337 
340  class Private;
341  Private* Storage;
343 
348 
351 
352 private:
353  vtkColorSeries(const vtkColorSeries&) = delete;
354  void operator=(const vtkColorSeries&) = delete;
355 };
356 
357 #endif // vtkColorSeries_h
purple-grey-orange diverging ColorBrewer scheme (8 colors)
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
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: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).