Go to the documentation of this file.
48 #ifndef vtkScalarsToColors_h
49 #define vtkScalarsToColors_h
82 {this->SetRange(rng[0],rng[1]);}
97 {this->GetColor(
v,this->RGB);
return this->RGB;}
110 {
double rgb[3]; this->GetColor(
x,rgb);
111 return static_cast<double>(rgb[0]*0.30 + rgb[1]*0.59 + rgb[2]*0.11);}
188 int inputDataType,
int numberOfValues,
189 int inputIncrement,
int outputFormat,
190 int vectorComponent,
int vectorSize);
192 int inputDataType,
int numberOfValues,
193 int inputIncrement,
int outputFormat)
194 { this->MapVectorsThroughTable(
input, output, inputDataType, numberOfValues,
195 inputIncrement, outputFormat, -1, -1); }
206 unsigned char *output,
209 unsigned char *output)
210 {this->MapScalarsThroughTable(scalars,output,
VTK_RGBA);}
212 int inputDataType,
int numberOfValues,
215 {this->MapScalarsThroughTable2(
input, output, inputDataType,
216 numberOfValues, inputIncrement, outputFormat);}
224 int inputDataType,
int numberOfValues,
326 template<
typename T>
static
331 template<
typename T>
static
334 *dest = ColorToUChar(
t);
355 int inputDataType,
int numberOfValues,
356 int numberOfComponents,
int vectorSize,
373 int inputDataType,
int numberOfValues,
374 int numberOfComponents,
int vectorSize);
389 class vtkInternalAnnotatedValueMap;
404 unsigned char RGBABytes[4];
408 double InputRange[2];
421 return static_cast<unsigned char>(
t*255 + 0.5);
426 return static_cast<unsigned char>(
t*255 + 0.5);
vtkVariant GetAnnotatedValue(vtkIdType idx)
virtual vtkIdType SetAnnotation(vtkVariant value, vtkStdString annotation)
#define vtkGetObjectMacro(name, type)
#define VTKCOMMONCORE_EXPORT
static void ColorToUChar(T t, unsigned char *dest)
void MapColorsToColors(void *input, unsigned char *output, int inputDataType, int numberOfValues, int numberOfComponents, int vectorSize, int outputFormat)
virtual vtkUnsignedCharArray * MapScalars(vtkDataArray *scalars, int colorMode, int component)
virtual unsigned char * MapValue(double v)
dynamic, self-adjusting array of unsigned char
#define vtkTypeMacro(thisClass, superclass)
abstract base class for most VTK objects
virtual bool RemoveAnnotation(vtkVariant value)
GLint GLint GLint GLint GLint x
abstract superclass for arrays of numeric data
GLenum GLenum GLenum input
virtual void GetIndexedColor(vtkIdType i, double rgba[4])
virtual void SetAlpha(double alpha)
virtual void SetAnnotations(vtkAbstractArray *values, vtkStringArray *annotations)
void SetVectorModeToMagnitude()
void MapVectorsThroughTable(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
virtual double GetOpacity(double v)
vtkIdType GetNumberOfAnnotatedValues()
static unsigned char ColorToUChar(T t)
GLsizei const GLfloat * value
void MapScalarsThroughTable(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
virtual void DeepCopy(vtkScalarsToColors *o)
GLboolean GLenum GLenum GLvoid * values
void SetVectorModeToComponent()
double * GetColor(double v)
a simple class to control print indentation
virtual vtkIdType SetAnnotation(vtkStdString value, vtkStdString annotation)
vtkAbstractArray * AnnotatedValues
void MapScalarsThroughTable(vtkDataArray *scalars, unsigned char *output, int outputFormat)
virtual void GetAnnotationColor(const vtkVariant &val, double rgba[4])
A atomic type representing the union of many types.
virtual void ResetAnnotations()
#define vtkGetMacro(name, type)
virtual int UsingLogScale()
Superclass for mapping scalar values to colors.
void MapVectorsToMagnitude(void *input, double *output, int inputDataType, int numberOfValues, int numberOfComponents, int vectorSize)
virtual void SetRange(double min, double max)
virtual void GetColor(double v, double rgb[3])
Abstract superclass for all arrays.
vtkBooleanMacro(IgnoreDriverBugs, bool)
virtual void UpdateAnnotatedValueMap()
vtkUnsignedCharArray * ConvertToRGBA(vtkDataArray *colors, int numComp, int numTuples)
vtkSetMacro(IgnoreDriverBugs, bool)
virtual vtkIdType GetNumberOfAvailableColors()
vtkStdString GetAnnotation(vtkIdType idx)
GLclampf GLclampf GLclampf alpha
void SetRange(double rng[2])
virtual double * GetRange()
double GetLuminance(double x)
void MapVectorsThroughTable(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat, int vectorComponent, int vectorSize)
vtkIdType GetAnnotatedValueIndexInternal(vtkVariant &val)
void PrintSelf(ostream &os, vtkIndent indent)
vtkInternalAnnotatedValueMap * AnnotatedValueMap
a vtkAbstractArray subclass for strings
virtual void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
Wrapper around std::string to keep symbols short.
vtkStringArray * Annotations
static vtkScalarsToColors * New()
virtual vtkUnsignedCharArray * MapScalars(vtkAbstractArray *scalars, int colorMode, int component)
vtkIdType GetAnnotatedValueIndex(vtkVariant val)
void MapScalarsThroughTable(vtkDataArray *scalars, unsigned char *output)
void SetVectorModeToRGBColors()
virtual vtkIdType CheckForAnnotatedValue(vtkVariant value)