Go to the documentation of this file.
52 #ifndef vtkScalarsToColors_h
53 #define vtkScalarsToColors_h
55 #include "vtkCommonCoreModule.h"
77 virtual int IsOpaque();
89 virtual double *GetRange();
90 virtual void SetRange(
double min,
double max);
92 {this->SetRange(rng[0],rng[1]);}
99 virtual unsigned char *MapValue(
double v);
105 virtual void GetColor(
double v,
double rgb[3]);
112 {this->GetColor(v,this->RGB);
return this->RGB;}
119 virtual double GetOpacity(
double v);
127 {
double rgb[3]; this->GetColor(x,rgb);
128 return static_cast<double>(rgb[0]*0.30 + rgb[1]*0.59 + rgb[2]*0.11);}
137 virtual void SetAlpha(
double alpha);
138 vtkGetMacro(Alpha,
double);
172 vtkGetMacro(VectorMode,
int);
173 void SetVectorModeToMagnitude();
174 void SetVectorModeToComponent();
175 void SetVectorModeToRGBColors();
190 vtkGetMacro(VectorComponent,
int);
202 vtkGetMacro(VectorSize,
int);
212 void MapVectorsThroughTable(
void *input,
unsigned char *output,
213 int inputDataType,
int numberOfValues,
214 int inputIncrement,
int outputFormat,
215 int vectorComponent,
int vectorSize);
217 int inputDataType,
int numberOfValues,
218 int inputIncrement,
int outputFormat)
219 { this->MapVectorsThroughTable(input, output, inputDataType, numberOfValues,
220 inputIncrement, outputFormat, -1, -1); }
231 unsigned char *output,
234 unsigned char *output)
235 {this->MapScalarsThroughTable(scalars,output,
VTK_RGBA);}
237 int inputDataType,
int numberOfValues,
240 {this->MapScalarsThroughTable2(input, output, inputDataType,
241 numberOfValues, inputIncrement, outputFormat);}
248 virtual void MapScalarsThroughTable2(
void *input,
unsigned char *output,
249 int inputDataType,
int numberOfValues,
268 virtual vtkIdType GetNumberOfAvailableColors();
319 virtual void GetAnnotationColor(
const vtkVariant& val,
double rgba[4]);
345 virtual void GetIndexedColor(
vtkIdType i,
double rgba[4]);
358 virtual void ResetAnnotations();
370 vtkGetMacro(IndexedLookup,
int);
381 template<
typename T>
static
386 template<
typename T>
static
389 *dest = ColorToUChar(t);
410 void MapColorsToColors(
void *input,
unsigned char *output,
411 int inputDataType,
int numberOfValues,
412 int numberOfComponents,
int vectorSize,
428 void MapVectorsToMagnitude(
void *input,
double *output,
429 int inputDataType,
int numberOfValues,
430 int numberOfComponents,
int vectorSize);
442 virtual
void UpdateAnnotatedValueMap();
448 class vtkInternalAnnotatedValueMap;
449 vtkInternalAnnotatedValueMap* AnnotatedValueMap;
463 unsigned char RGBABytes[4];
467 double InputRange[2];
482 return static_cast<unsigned char>(t*255 + 0.5);
487 return static_cast<unsigned char>(t*255 + 0.5);
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
static void ColorToUChar(T t, unsigned char *dest)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
dynamic, self-adjusting array of unsigned char
abstract base class for most VTK objects
virtual void Build()
Perform any processing required (if any) before processing scalars.
abstract superclass for arrays of numeric data
void MapVectorsThroughTable(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
static unsigned char ColorToUChar(T t)
Converts a color from numeric type T to uchar.
void MapScalarsThroughTable(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
double * GetColor(double v)
Map one value through the lookup table and return the color as an RGB array of doubles between 0 and ...
a simple class to control print indentation
A atomic type representing the union of many types.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int UsingLogScale()
This should return 1 is the subclass is using log scale for mapping scalars to colors.
Superclass for mapping scalar values to colors.
Abstract superclass for all arrays.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
void SetRange(double rng[2])
double GetLuminance(double x)
Map one value through the lookup table and return the luminance 0.3*red + 0.59*green + 0....
a vtkAbstractArray subclass for strings
Wrapper around std::string to keep symbols short.
void MapScalarsThroughTable(vtkDataArray *scalars, unsigned char *output)