|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
   54 #ifndef vtkLookupTable_h 
   55 #define vtkLookupTable_h 
   57 #include "vtkCommonCoreModule.h"  
   62 #define VTK_RAMP_LINEAR 0 
   63 #define VTK_RAMP_SCURVE 1 
   64 #define VTK_RAMP_SQRT 2 
   65 #define VTK_SCALE_LINEAR 0 
   66 #define VTK_SCALE_LOG10 1 
  106   int Allocate(
int sz = 256, 
int ext = 256);
 
  112   void Build() 
override;
 
  121   virtual void ForceBuild();
 
  126   void BuildSpecialColors();
 
  141   vtkSetMacro(Ramp, 
int);
 
  145   vtkGetMacro(Ramp, 
int);
 
  154   void SetScale(
int scale);
 
  157   vtkGetMacro(Scale, 
int);
 
  169   virtual void SetTableRange(
const double r[2]);
 
  170   virtual void SetTableRange(
double min, 
double max);
 
  171   vtkGetVectorMacro(TableRange, 
double, 2);
 
  179   vtkSetVector2Macro(HueRange, 
double);
 
  180   vtkGetVector2Macro(HueRange, 
double);
 
  188   vtkSetVector2Macro(SaturationRange, 
double);
 
  189   vtkGetVector2Macro(SaturationRange, 
double);
 
  197   vtkSetVector2Macro(ValueRange, 
double);
 
  198   vtkGetVector2Macro(ValueRange, 
double);
 
  206   vtkSetVector2Macro(AlphaRange, 
double);
 
  207   vtkGetVector2Macro(AlphaRange, 
double);
 
  215   vtkSetVector4Macro(NanColor, 
double);
 
  216   vtkGetVector4Macro(NanColor, 
double);
 
  223   unsigned char* GetNanColorAsUnsignedChars();
 
  228   static void GetColorAsUnsignedChars(
const double colorIn[4], 
unsigned char colorOut[4]);
 
  235   vtkSetVector4Macro(BelowRangeColor, 
double);
 
  236   vtkGetVector4Macro(BelowRangeColor, 
double);
 
  253   vtkSetVector4Macro(AboveRangeColor, 
double);
 
  254   vtkGetVector4Macro(AboveRangeColor, 
double);
 
  269   const unsigned char* 
MapValue(
double v) 
override;
 
  275   void GetColor(
double x, 
double rgb[3]) 
override;
 
  298   void SetNumberOfTableValues(
vtkIdType number);
 
  308   virtual void SetTableValue(
vtkIdType indx, 
const double rgba[4]);
 
  314   virtual void SetTableValue(
vtkIdType indx, 
double r, 
double g, 
double b, 
double a = 1.0);
 
  326   void GetTableValue(
vtkIdType id, 
double rgba[4]);
 
  344   unsigned char* WritePointer(
vtkIdType id, 
int number);
 
  352   void SetRange(
double min, 
double max)
 override { this->SetTableRange(min, 
max); }
 
  362   static void GetLogRange(
const double range[2], 
double log_range[2]);
 
  367   static double ApplyLogScale(
double v, 
const double range[2], 
const double log_range[2]);
 
  396     int numberOfValues, 
int inputIncrement, 
int outputIncrement) 
override;
 
  429   double TableRange[2];
 
  431   double SaturationRange[2];
 
  432   double ValueRange[2];
 
  433   double AlphaRange[2];
 
  435   double BelowRangeColor[4];
 
  437   double AboveRangeColor[4];
 
  445   unsigned char NanColorChar[4];
 
  454   void ResizeTableForSpecialColors();
 
  
ValueType * WritePointer(vtkIdType valueIdx, vtkIdType numValues)
Get the address of a particular data index.
vtkTimeStamp OpaqueFlagBuildTime
vtkTypeBool UseAboveRangeColor
static const vtkIdType NAN_COLOR_INDEX
static const vtkIdType ABOVE_RANGE_COLOR_INDEX
static const vtkIdType BELOW_RANGE_COLOR_INDEX
record modification and/or execution time
static const vtkIdType REPEATED_LAST_COLOR_INDEX
Constants for offsets of special colors (e.g., NanColor, BelowRangeColor, AboveRangeColor) from the m...
dynamic, self-adjusting array of unsigned char
virtual void Build()
Perform any processing required (if any) before processing scalars.
void SetRange(const double rng[2]) override
unsigned char * WritePointer(vtkIdType id, int number)
Get pointer to data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void GetIndexedColor(vtkIdType i, double rgba[4])
Get the "indexed color" assigned to an index.
static const vtkIdType NUMBER_OF_SPECIAL_COLORS
virtual double GetOpacity(double v)
Map one value through the lookup table and return the alpha value (the opacity) as a double between 0...
vtkTimeStamp SpecialColorsBuildTime
#define VTK_SIZEHINT(...)
void Modified()
Set this objects time to the current time.
virtual void DeepCopy(vtkScalarsToColors *o)
Copy the contents from another object.
a simple class to control print indentation
Superclass for mapping scalar values to colors.
virtual const unsigned char * MapValue(double v)
Map one value through the lookup table and return a color defined as an RGBA unsigned char tuple (4 b...
virtual void GetColor(double v, double rgb[3])
Map one value through the lookup table and store the color as an RGB array of doubles between 0 and 1...
Abstract superclass for all arrays.
vtkIdType GetNumberOfTableValues()
map scalar values into colors via a lookup table
virtual vtkIdType GetNumberOfAvailableColors()
Get the number of available colors for mapping to.
int UsingLogScale() override
This should return 1 if the subclass is using log scale for mapping scalars to colors.
virtual void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
An internal method typically not used in applications.
vtkUnsignedCharArray * Table
static vtkScalarsToColors * New()
unsigned char * GetPointer(vtkIdType id)
Get pointer to color table data.
vtkTypeBool UseBelowRangeColor
double * GetRange() override
Sets/Gets the range of scalars which will be mapped.
void SetRange(double min, double max) override
virtual int IsOpaque()
Return true if all of the values defining the mapping have an opacity equal to 1.