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 
41 #ifndef vtkColorSeries_h
42 #define vtkColorSeries_h
43 
44 #include "vtkCommonColorModule.h" // For export macro
45 #include "vtkObject.h"
46 #include "vtkColor.h" // Needed for vtkColor[34]ub
47 #include "vtkStdString.h" // Needed for arguments
48 
49 class vtkLookupTable;
50 
51 class VTKCOMMONCOLOR_EXPORT vtkColorSeries : public vtkObject
52 {
53 public:
54  vtkTypeMacro(vtkColorSeries, vtkObject);
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
60  static vtkColorSeries* New();
61 
65  enum ColorSchemes {
67  SPECTRUM = 0,
191  CUSTOM
192  };
193 
199 enum LUTMode {
201  ORDINAL = 0,
203  CATEGORICAL
204 };
205 
207 
214  virtual void SetColorScheme(int scheme);
215  virtual int SetColorSchemeByName(const vtkStdString& schemeName);
217 
221  int GetNumberOfColorSchemes() const;
222 
226  virtual vtkStdString GetColorSchemeName() const;
227 
231  virtual void SetColorSchemeName(const vtkStdString& scheme);
232 
236  virtual int GetColorScheme() const;
237 
241  virtual int GetNumberOfColors() const;
242 
248  virtual void SetNumberOfColors(int numColors);
249 
254  vtkColor3ub GetColor(int index) const;
255 
260  vtkColor3ub GetColorRepeating(int index) const;
261 
266  virtual void SetColor(int index, const vtkColor3ub &color);
267 
271  virtual void AddColor(const vtkColor3ub &color);
272 
276  virtual void InsertColor(int index, const vtkColor3ub &color);
277 
281  virtual void RemoveColor(int index);
282 
286  virtual void ClearColors();
287 
291  virtual void DeepCopy(vtkColorSeries *chartColors);
292 
300  void BuildLookupTable(vtkLookupTable* lkup, int lutIndexing = CATEGORICAL);
301 
312  vtkLookupTable* CreateLookupTable(int lutIndexing = CATEGORICAL);
313 
314 protected:
315  vtkColorSeries();
316  ~vtkColorSeries() override;
317 
322  virtual void CopyOnWrite();
323 
325 
328  class Private;
329  Private* Storage;
331 
336 
339 
340 private:
341  vtkColorSeries(const vtkColorSeries &) = delete;
342  void operator=(const vtkColorSeries &) = delete;
343 
344 };
345 
346 #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:53
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).