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 
33 
34 class vtkLookupTable;
36 
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
47  virtual void Build();
48 
50 
54  vtkSetMacro(Discretize, int);
55  vtkGetMacro(Discretize, int);
56  vtkBooleanMacro(Discretize, int);
58 
60 
62  virtual void SetUseLogScale(int useLogScale);
63  vtkGetMacro(UseLogScale, int);
65 
67 
70  void SetNumberOfValues(vtkIdType number);
71  vtkGetMacro(NumberOfValues, vtkIdType);
73 
76  virtual unsigned char *MapValue(double v);
77 
80  virtual void GetColor(double v, double rgb[3]);
81 
83 
92  virtual vtkUnsignedCharArray *MapScalars(vtkDataArray *scalars, int colorMode,
93  int component);
95 
97  double* GetRGBPoints();
98 
103  virtual void SetAlpha(double alpha);
104 
105 
107 
110  virtual void SetNanColor(double r, double g, double b);
111  virtual void SetNanColor(double rgb[3]) {
112  this->SetNanColor(rgb[0], rgb[1], rgb[2]);
113  }
115 
116 
118 
120  virtual int UsingLogScale()
121  { return this->UseLogScale; }
123 
126 
127 protected:
130 
133 
136 
138 private:
140  void operator=(const vtkDiscretizableColorTransferFunction&); // Not implemented.
141 
142  // Pointer used by GetRGBPoints().
143  double* Data;
144 };
145 
146 #endif
147 
virtual vtkIdType GetNumberOfAvailableColors()
#define VTK_FILTERING_EXPORT
record modification and/or execution time
Definition: vtkTimeStamp.h:33
static vtkColorTransferFunction * New()
map scalar values into colors via a lookup table
virtual void SetAlpha(double alpha)
virtual unsigned char * MapValue(double v)
int vtkIdType
Definition: vtkType.h:255
virtual void SetNanColor(double, double, double)
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
dynamic, self-adjusting array of unsigned char
a combination of vtkColorTransferFunction and vtkLookupTable.
virtual vtkUnsignedCharArray * MapScalars(vtkDataArray *scalars, int colorMode, int component)
Defines a transfer function for mapping a property to an RGB color value.
virtual void Build()