VTK
vtkDiscretizableColorTransferFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDiscretizableColorTransferFunction.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 =========================================================================*/
29 #ifndef __vtkDiscretizableColorTransferFunction_h
30 #define __vtkDiscretizableColorTransferFunction_h
31 
32 #include "vtkRenderingCoreModule.h" // For export macro
34 
35 class vtkLookupTable;
37 
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
48  virtual void Build();
49 
51 
55  vtkSetMacro(Discretize, int);
56  vtkGetMacro(Discretize, int);
57  vtkBooleanMacro(Discretize, int);
59 
61 
63  virtual void SetUseLogScale(int useLogScale);
64  vtkGetMacro(UseLogScale, int);
66 
68 
71  void SetNumberOfValues(vtkIdType number);
72  vtkGetMacro(NumberOfValues, vtkIdType);
74 
77  virtual unsigned char *MapValue(double v);
78 
81  virtual void GetColor(double v, double rgb[3]);
82 
84 
93  virtual vtkUnsignedCharArray *MapScalars(vtkDataArray *scalars, int colorMode,
94  int component);
96 
98  double* GetRGBPoints();
99 
104  virtual void SetAlpha(double alpha);
105 
106 
108 
111  virtual void SetNanColor(double r, double g, double b);
112  virtual void SetNanColor(double rgb[3]) {
113  this->SetNanColor(rgb[0], rgb[1], rgb[2]);
114  }
116 
117 
119 
121  virtual int UsingLogScale()
122  { return this->UseLogScale; }
124 
127 
128 protected:
131 
134 
137 
139 private:
141  void operator=(const vtkDiscretizableColorTransferFunction&); // Not implemented.
142 
143  // Pointer used by GetRGBPoints().
144  double* Data;
145 };
146 
147 #endif
148