Go to the documentation of this file.
45 #ifndef vtkDiscretizableColorTransferFunction_h
46 #define vtkDiscretizableColorTransferFunction_h
48 #include "vtkRenderingCoreModule.h"
76 { this->SetIndexedColor(
index, rgb[0], rgb[1], rgb[2]); }
77 void SetIndexedColor(
unsigned int index,
double r,
double g,
double b);
99 void SetNumberOfIndexedColors(
unsigned int count);
100 unsigned int GetNumberOfIndexedColors();
109 virtual void Build();
119 vtkGetMacro(Discretize,
int);
128 virtual void SetUseLogScale(
int useLogScale);
129 vtkGetMacro(UseLogScale,
int);
146 virtual unsigned char *
MapValue(
double v);
152 virtual void GetColor(
double v,
double rgb[3]);
187 VTK_LEGACY(
double* GetRGBPoints());
204 virtual void SetNanColor(
double r,
double g,
double b);
215 {
return this->UseLogScale; }
235 vtkGetMacro(EnableOpacityMapping,
bool)
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;
double * GetColor(double x)
Returns an RGB color for the specified scalar value.
static vtkColorTransferFunction * New()
virtual int UsingLogScale()
This should return 1 if the subclass is using log scale for mapping scalars to colors.
virtual void SetNanColor(double, double, double)
Set the RGB color to use when a NaN (not a number) is encountered.
int UseLogScale
Flag indicating whether log scaling is to be used.
virtual vtkIdType GetNumberOfAvailableColors()
Get the number of available colors for mapping to.
virtual unsigned char * MapValue(double v)
Map one value through the lookup table.
record modification and/or execution time
virtual vtkUnsignedCharArray * MapScalars(vtkDataArray *scalars, int colorMode, int component)
Internal methods that map a data array into a 4-component, unsigned char RGBA array.
dynamic, self-adjusting array of unsigned char
vtkLookupTable * LookupTable
Internal lookup table used for some aspects of the color mapping.
int Discretize
Flag indicating whether transfer function is discretized.
virtual void Build()
Perform any processing required (if any) before processing scalars.
abstract superclass for arrays of numeric data
a combination of vtkColorTransferFunction and vtkLookupTable.
Defines a transfer function for mapping a property to an RGB color value.
virtual void SetAlpha(double alpha)
Specify an additional opacity (alpha) value to blend with.
bool EnableOpacityMapping
vtkTypeUInt64 vtkMTimeType
virtual double GetOpacity(double v)
Map one value through the lookup table and return the alpha value (the opacity) as a double between 0...
virtual void SetNanColor(double rgb[3])
virtual vtkMTimeType GetMTime()
Return this object's modified time.
a simple class to control print indentation
void PrintSelf(ostream &os, vtkIndent indent)
Print method for vtkColorTransferFunction.
Defines a 1D piecewise function.
Abstract superclass for all arrays.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
map scalar values into colors via a lookup table
vtkIdType NumberOfValues
Number of values to use in discretized color map.
void SetIndexedColor(unsigned int index, const double rgb[3])
Add colors to use when IndexedLookup is true.
virtual void GetIndexedColor(vtkIdType idx, double rgba[4])
Return a color given an integer index.
vtkSmartPointer< vtkPiecewiseFunction > ScalarOpacityFunction
virtual int IsOpaque()
Return true if all of the values defining the mapping have an opacity equal to 1.