45#ifndef vtkDiscretizableColorTransferFunction_h
46#define vtkDiscretizableColorTransferFunction_h
48#include "vtkRenderingCoreModule.h"
76 { this->SetIndexedColor(
index, rgb[0], rgb[1], rgb[2]); }
119 vtkGetMacro(Discretize,
int);
129 vtkGetMacro(UseLogScale,
int);
215 {
return this->UseLogScale; }
235 vtkGetMacro(EnableOpacityMapping,
bool)
270 bool EnableOpacityMapping;
273 void MapDataArrayToOpacity(
280 template<typename T, typename VectorGetter>
281 void MapVectorToOpacity (
282 VectorGetter getter, T* scalars,
int component,
283 int numberOfComponents,
vtkIdType numberOfTuples,
unsigned char* colors);
285 template<template<class> class VectorGetter>
286 void AllTypesMapVectorToOpacity (
289 int numberOfComponents,
vtkIdType numberOfTuples,
unsigned char* colors);
292 vtkInternals* Internals;
Abstract superclass for all arrays.
Defines a transfer function for mapping a property to an RGB color value.
virtual void SetNanColor(double, double, double)
Set the RGB color to use when a NaN (not a number) is encountered.
abstract superclass for arrays of numeric data
a combination of vtkColorTransferFunction and vtkLookupTable.
virtual vtkUnsignedCharArray * MapScalars(vtkAbstractArray *scalars, int colorMode, int component)
void SetIndexedColor(unsigned int index, const double rgb[3])
Add colors to use when IndexedLookup is true.
unsigned int GetNumberOfIndexedColors()
virtual int UsingLogScale()
This should return 1 if the subclass is using log scale for mapping scalars to colors.
virtual void Build()
Generate discretized lookup table, if applicable.
virtual vtkUnsignedCharArray * MapScalars(vtkDataArray *scalars, int colorMode, int component)
Internal methods that map a data array into a 4-component, unsigned char RGBA array.
virtual void GetColor(double v, double rgb[3])
Map one value through the lookup table and return the color as an RGB array of doubles between 0 and ...
void SetNumberOfIndexedColors(unsigned int count)
Set the number of indexed colors.
virtual double GetOpacity(double v)
Return the opacity of a given scalar.
void SetIndexedColor(unsigned int index, double r, double g, double b)
virtual void SetNanColor(double r, double g, double b)
Set the color to use when a NaN (not a number) is encountered.
virtual vtkIdType GetNumberOfAvailableColors()
Get the number of available colors for mapping to.
virtual vtkPiecewiseFunction * GetScalarOpacityFunction() const
virtual void SetNanColor(double rgb[3])
void PrintSelf(ostream &os, vtkIndent indent)
Print method for vtkColorTransferFunction.
virtual void SetUseLogScale(int useLogScale)
Get/Set if log scale must be used while mapping scalars to colors.
virtual void SetScalarOpacityFunction(vtkPiecewiseFunction *function)
Set/get the opacity function to use.
static vtkDiscretizableColorTransferFunction * New()
virtual void SetAlpha(double alpha)
Specify an additional opacity (alpha) value to blend with.
int IsOpaque()
Returns the negation of EnableOpacityMapping.
virtual unsigned char * MapValue(double v)
Map one value through the lookup table and return a color defined as a RGBA unsigned char tuple (4 by...
double * GetRGBPoints()
Returns the (x, r, g, b) values as an array.
virtual void GetIndexedColor(vtkIdType i, double rgba[4])
Get the "indexed color" assigned to an index.
a simple class to control print indentation
map scalar values into colors via a lookup table
Defines a 1D piecewise function.
Hold a reference to a vtkObjectBase instance.
record modification and/or execution time
dynamic, self-adjusting array of unsigned char
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkTimeStamp BuildTime
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkTypeUInt64 vtkMTimeType