VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
43 #ifndef __vtkColorSeries_h
44 #define __vtkColorSeries_h
45 
46 #include "vtkCommonColorModule.h" // For export macro
47 #include "vtkObject.h"
48 #include "vtkColor.h" // Needed for vtkColor[34]ub
49 #include "vtkStdString.h" // Needed for arguments
50 
51 class vtkLookupTable;
52 
53 class VTKCOMMONCOLOR_EXPORT vtkColorSeries : public vtkObject
54 {
55 public:
56  vtkTypeMacro(vtkColorSeries, vtkObject);
57  virtual void PrintSelf(ostream &os, vtkIndent indent);
58 
60  static vtkColorSeries* New();
61 
62 //BTX
64 
65  enum {
67  SPECTRUM = 0,
191  CUSTOM
192  };
193 //ETX
195 
197 
202  virtual void SetColorScheme(int scheme);
203  virtual int SetColorSchemeByName(const vtkStdString& schemeName);
205 
207  int GetNumberOfColorSchemes() const;
208 
210  virtual vtkStdString GetColorSchemeName() const;
211 
213  virtual void SetColorSchemeName(const vtkStdString& scheme);
214 
216  virtual int GetColorScheme() const;
217 
219  virtual int GetNumberOfColors() const;
220 
224  virtual void SetNumberOfColors(int numColors);
225 
226 //BTX
229  vtkColor3ub GetColor(int index) const;
230 
233  vtkColor3ub GetColorRepeating(int index) const;
234 
237  virtual void SetColor(int index, const vtkColor3ub &color);
238 
240  virtual void AddColor(const vtkColor3ub &color);
241 
243 
244  virtual void InsertColor(int index, const vtkColor3ub &color);
245 //ETX
247 
249  virtual void RemoveColor(int index);
250 
252  virtual void ClearColors();
253 
255  virtual void DeepCopy(vtkColorSeries *chartColors);
256 
258  void BuildLookupTable(vtkLookupTable* lkup);
259 
262  vtkLookupTable* CreateLookupTable();
263 
264 //BTX
265 protected:
266  vtkColorSeries();
267  virtual ~vtkColorSeries();
268 
271  virtual void CopyOnWrite();
272 
274 
275  class Private;
276  Private* Storage;
278 
281 
284 
285 private:
286  vtkColorSeries(const vtkColorSeries &); // Not implemented.
287  void operator=(const vtkColorSeries &); // Not implemented.
288 //ETX
289 };
290 
291 #endif //__vtkColorSeries_h
blue to purple sequential ColorBrewer scheme (3 colors)
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
blue to green sequential ColorBrewer scheme (3 colors)
7 different blues.
abstract base class for most VTK objects
Definition: vtkObject.h:61
diverging spectral ColorBrewer scheme (6 colors)
purple-grey-orange diverging ColorBrewer scheme (4 colors)
brown-blue-green diverging ColorBrewer scheme (3 colors)
yellow-orange-brown sequential ColorBrewer scheme (7 colors)
a qualitative ColorBrewer scheme composed of pastel colors
yellow-orange-brown sequential ColorBrewer scheme (4 colors)
blue to purple sequential ColorBrewer scheme (7 colors)
purple-grey-orange diverging ColorBrewer scheme (6 colors)
a qualitative ColorBrewer scheme useful for color set members
blue to green sequential ColorBrewer scheme (5 colors)
map scalar values into colors via a lookup table
7 cool colors (green to purple).
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
blue to green sequential ColorBrewer scheme (4 colors)
purple-grey-orange diverging ColorBrewer scheme (9 colors)
6 warm colors (red to yellow).
brown-blue-green diverging ColorBrewer scheme (9 colors)
yellow-orange-brown sequential ColorBrewer scheme (9 colors)
purple-grey-orange diverging ColorBrewer scheme (3 colors)
qualitative ColorBrewer scheme good for accenting
brown-blue-green diverging ColorBrewer scheme (5 colors)
a dark set of qualitative colors from ColorBrewer
brown-blue-green diverging ColorBrewer scheme (10 colors)
virtual void PrintSelf(ostream &os, vtkIndent indent)
blue to purple sequential ColorBrewer scheme (5 colors)
yellow-orange-brown sequential ColorBrewer scheme (8 colors)
6 colors from green to orange.
a simple class to control print indentation
Definition: vtkIndent.h:38
blue to purple sequential ColorBrewer scheme (4 colors)
brown-blue-green diverging ColorBrewer scheme (4 colors)
a qualitative ColorBrewer scheme useful for color set members
yellow-orange-brown sequential ColorBrewer scheme (6 colors)
diverging spectral ColorBrewer scheme (3 colors)
diverging spectral ColorBrewer scheme (11 colors)
purple-grey-orange diverging ColorBrewer scheme (7 colors)
blue to purple sequential ColorBrewer scheme (6 colors)
diverging spectral ColorBrewer scheme (7 colors)
a qualitative ColorBrewer scheme useful for color set members
diverging spectral ColorBrewer scheme (9 colors)
blue to green sequential ColorBrewer scheme (8 colors)
brown-blue-green diverging ColorBrewer scheme (6 colors)
vtkStdString ColorSchemeName
The color scheme being used.
purple-grey-orange diverging ColorBrewer scheme (5 colors)
diverging spectral ColorBrewer scheme (8 colors)
brown-blue-green diverging ColorBrewer scheme (7 colors)
stores a list of colors.
a qualitative ColorBrewer scheme composed of pastel colors
blue to purple sequential ColorBrewer scheme (8 colors)
brown-blue-green diverging ColorBrewer scheme (11 colors)
purple-grey-orange diverging ColorBrewer scheme (11 colors)
blue to purple sequential ColorBrewer scheme (9 colors)
brown-blue-green diverging ColorBrewer scheme (8 colors)
purple-grey-orange diverging ColorBrewer scheme (8 colors)
blue to green sequential ColorBrewer scheme (6 colors)
diverging spectral ColorBrewer scheme (10 colors)
purple-grey-orange diverging ColorBrewer scheme (10 colors)
static vtkObject * New()
Private * Storage
a qualitative ColorBrewer scheme with pairs of matching colors
diverging spectral ColorBrewer scheme (5 colors)
blue to green sequential ColorBrewer scheme (7 colors)
blue to green sequential ColorBrewer scheme (9 colors)
yellow-orange-brown sequential ColorBrewer scheme (3 colors)
diverging spectral ColorBrewer scheme (4 colors)
7 colors from blue to magenta.
yellow-orange-brown sequential ColorBrewer scheme (5 colors)