VTK  9.7.1
vtkColorSeries.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
42 #ifndef vtkColorSeries_h
43 #define vtkColorSeries_h
44 
45 #include "vtkColor.h" // Needed for vtkColor[34]ub
46 #include "vtkCommonColorModule.h" // For export macro
47 #include "vtkObject.h"
48 #include "vtkStdString.h" // Needed for arguments
49 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
50 
51 VTK_ABI_NAMESPACE_BEGIN
52 class vtkLookupTable;
53 
54 class VTKCOMMONCOLOR_EXPORT VTK_MARSHALAUTO vtkColorSeries : public vtkObject
55 {
56 public:
57  vtkTypeMacro(vtkColorSeries, vtkObject);
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
63  static vtkColorSeries* New();
64 
69  {
71  SPECTRUM = 0,
195  CUSTOM
196  };
197 
203  enum LUTMode
204  {
206  ORDINAL = 0,
208  CATEGORICAL
209  };
210 
212 
219  virtual void SetColorScheme(int scheme);
220  virtual int SetColorSchemeByName(const vtkStdString& schemeName);
222 
226  int GetNumberOfColorSchemes() const;
227 
231  virtual vtkStdString GetColorSchemeName() const;
232 
236  virtual void SetColorSchemeName(const vtkStdString& name);
237 
241  virtual int GetColorScheme() const;
242 
246  virtual int GetNumberOfColors() const;
247 
253  virtual void SetNumberOfColors(int numColors);
254 
259  vtkColor3ub GetColor(int index) const;
260 
265  vtkColor3ub GetColorRepeating(int index) const;
266 
271  virtual void SetColor(int index, const vtkColor3ub& color);
272 
276  virtual void AddColor(const vtkColor3ub& color);
277 
281  virtual void InsertColor(int index, const vtkColor3ub& color);
282 
286  virtual void RemoveColor(int index);
287 
291  virtual void ClearColors();
292 
296  virtual void DeepCopy(vtkColorSeries* chartColors);
297 
305  void BuildLookupTable(vtkLookupTable* lkup, int lutIndexing = CATEGORICAL);
306 
317  vtkLookupTable* CreateLookupTable(int lutIndexing = CATEGORICAL);
318 
319 protected:
320  vtkColorSeries();
321  ~vtkColorSeries() override;
322 
327  virtual void CopyOnWrite();
328 
330 
333  class Private;
334  Private* Storage;
336 
341 
344 
345 private:
346  vtkColorSeries(const vtkColorSeries&) = delete;
347  void operator=(const vtkColorSeries&) = delete;
348 };
349 
350 VTK_ABI_NAMESPACE_END
351 #endif // vtkColorSeries_h
purple-grey-orange diverging ColorBrewer scheme (8 colors)
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:27
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:52
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:183
blue to purple sequential ColorBrewer scheme (8 colors)
a simple class to control print indentation
Definition: vtkIndent.h:28
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)
#define VTK_MARSHALAUTO
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).