50 #ifndef __vtkLookupTable_h
51 #define __vtkLookupTable_h
53 #include "vtkCommonCoreModule.h"
58 #define VTK_RAMP_LINEAR 0
59 #define VTK_RAMP_SCURVE 1
60 #define VTK_RAMP_SQRT 2
61 #define VTK_SCALE_LINEAR 0
62 #define VTK_SCALE_LOG10 1
79 int Allocate(
int sz=256,
int ext=256);
90 virtual void ForceBuild();
100 vtkSetMacro(Ramp,
int);
104 vtkGetMacro(Ramp,
int);
111 void SetScale(
int scale);
114 vtkGetMacro(Scale,
int);
123 void SetTableRange(
double r[2]);
124 virtual void SetTableRange(
double min,
double max);
125 vtkGetVectorMacro(TableRange,
double,2);
131 vtkSetVector2Macro(HueRange,
double);
132 vtkGetVector2Macro(HueRange,
double);
138 vtkSetVector2Macro(SaturationRange,
double);
139 vtkGetVector2Macro(SaturationRange,
double);
145 vtkSetVector2Macro(ValueRange,
double);
146 vtkGetVector2Macro(ValueRange,
double);
152 vtkSetVector2Macro(AlphaRange,
double);
153 vtkGetVector2Macro(AlphaRange,
double);
159 vtkSetVector4Macro(NanColor,
double);
160 vtkGetVector4Macro(NanColor,
double);
165 unsigned char* GetNanColorAsUnsignedChars();
172 void GetColor(
double x,
double rgb[3]);
187 void SetNumberOfTableValues(
vtkIdType number);
195 virtual void SetTableValue(
vtkIdType indx,
double rgba[4]);
200 virtual void SetTableValue(
vtkIdType indx,
201 double r,
double g,
double b,
double a=1.0);
210 void GetTableValue(
vtkIdType id,
double rgba[4]);
216 return this->Table->GetPointer(4*
id); };
223 unsigned char *WritePointer(
const vtkIdType id,
const int number);
228 double *
GetRange() {
return this->GetTableRange(); };
229 void SetRange(
double min,
double max) { this->SetTableRange(min, max); };
238 static void GetLogRange(
const double range[2],
double log_range[2]);
242 static double ApplyLogScale(
double v,
const double range[2],
243 const double log_range[2]);
267 int inputDataType,
int numberOfValues,
268 int inputIncrement,
int outputIncrement);
297 double TableRange[2];
299 double SaturationRange[2];
300 double ValueRange[2];
301 double AlphaRange[2];
308 unsigned char NanColorChar[4];
void SetRange(double min, double max)
virtual int UsingLogScale()
vtkTimeStamp OpaqueFlagBuildTime
record modification and/or execution time
map scalar values into colors via a lookup table
virtual void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
virtual unsigned char * MapValue(double v)
Superclass for mapping scalar values to colors.
virtual double GetOpacity(double v)
static vtkScalarsToColors * New()
unsigned char * WritePointer(vtkIdType id, vtkIdType number)
a simple class to control print indentation
virtual void GetColor(double v, double rgb[3])
vtkIdType GetNumberOfTableValues()
unsigned char * GetPointer(const vtkIdType id)
dynamic, self-adjusting array of unsigned char
void SetRange(double rng[2])
unsigned char * WritePointer(const vtkIdType id, const int number)
vtkUnsignedCharArray * Table
virtual void GetIndexedColor(vtkIdType i, double rgba[4])
Get the "indexed color" assigned to an index.
virtual void DeepCopy(vtkScalarsToColors *o)
void PrintSelf(ostream &os, vtkIndent indent)
virtual vtkIdType GetNumberOfAvailableColors()