59 #ifndef vtkLookupTable_h
60 #define vtkLookupTable_h
67 #define VTK_RAMP_LINEAR 0
68 #define VTK_RAMP_SCURVE 1
69 #define VTK_RAMP_SQRT 2
70 #define VTK_SCALE_LINEAR 0
71 #define VTK_SCALE_LOG10 1
98 int Allocate(
int sz=256,
int ext=256);
102 virtual void Build();
109 virtual void ForceBuild();
119 vtkSetMacro(Ramp,
int);
123 vtkGetMacro(Ramp,
int);
130 void SetScale(
int scale);
133 vtkGetMacro(Scale,
int);
142 void SetTableRange(
double r[2]);
143 virtual void SetTableRange(
double min,
double max);
144 vtkGetVectorMacro(TableRange,
double,2);
150 vtkSetVector2Macro(HueRange,
double);
151 vtkGetVector2Macro(HueRange,
double);
157 vtkSetVector2Macro(SaturationRange,
double);
158 vtkGetVector2Macro(SaturationRange,
double);
164 vtkSetVector2Macro(ValueRange,
double);
165 vtkGetVector2Macro(ValueRange,
double);
171 vtkSetVector2Macro(AlphaRange,
double);
172 vtkGetVector2Macro(AlphaRange,
double);
178 vtkSetVector4Macro(NanColor,
double);
179 vtkGetVector4Macro(NanColor,
double);
184 unsigned char* GetNanColorAsUnsignedChars();
189 static void GetColorAsUnsignedChars(
const double colorIn[4],
190 unsigned char colorOut[4]);
196 vtkSetVector4Macro(BelowRangeColor,
double);
197 vtkGetVector4Macro(BelowRangeColor,
double);
202 vtkSetMacro(UseBelowRangeColor,
int);
203 vtkGetMacro(UseBelowRangeColor,
int);
204 vtkBooleanMacro(UseBelowRangeColor,
int);
210 vtkSetVector4Macro(AboveRangeColor,
double);
211 vtkGetVector4Macro(AboveRangeColor,
double);
216 vtkSetMacro(UseAboveRangeColor,
int);
217 vtkGetMacro(UseAboveRangeColor,
int);
218 vtkBooleanMacro(UseAboveRangeColor,
int);
226 void GetColor(
double x,
double rgb[3]);
241 void SetNumberOfTableValues(
vtkIdType number);
249 virtual void SetTableValue(
vtkIdType indx,
double rgba[4]);
254 virtual void SetTableValue(
vtkIdType indx,
255 double r,
double g,
double b,
double a=1.0);
264 void GetTableValue(
vtkIdType id,
double rgba[4]);
270 return this->Table->GetPointer(4*
id); };
277 unsigned char *WritePointer(
const vtkIdType id,
const int number);
282 double *
GetRange() {
return this->GetTableRange(); };
283 void SetRange(
double min,
double max) { this->SetTableRange(min, max); };
292 static void GetLogRange(
const double range[2],
double log_range[2]);
296 static double ApplyLogScale(
double v,
const double range[2],
297 const double log_range[2]);
321 int inputDataType,
int numberOfValues,
322 int inputIncrement,
int outputIncrement);
351 double TableRange[2];
353 double SaturationRange[2];
354 double ValueRange[2];
355 double AlphaRange[2];
357 double BelowRangeColor[4];
359 double AboveRangeColor[4];
367 unsigned char NanColorChar[4];
374 void ResizeTableForSpecialColors();
386 return this->
Table->WritePointer(4*
id,4*number);
void SetRange(double min, double max)
virtual int UsingLogScale()
vtkTimeStamp OpaqueFlagBuildTime
#define VTKCOMMONCORE_EXPORT
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)
static const vtkIdType NUMBER_OF_SPECIAL_COLORS
virtual unsigned char * MapValue(double v)
Superclass for mapping scalar values to colors.
virtual double GetOpacity(double v)
static vtkScalarsToColors * New()
a simple class to control print indentation
virtual void GetColor(double v, double rgb[3])
vtkIdType GetNumberOfTableValues()
static const vtkIdType NAN_COLOR_INDEX
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])
static const vtkIdType BELOW_RANGE_COLOR_INDEX
virtual void DeepCopy(vtkScalarsToColors *o)
void PrintSelf(ostream &os, vtkIndent indent)
static const vtkIdType ABOVE_RANGE_COLOR_INDEX
virtual vtkIdType GetNumberOfAvailableColors()