Go to the documentation of this file.
49 #ifndef vtkDiscretizableColorTransferFunction_h
50 #define vtkDiscretizableColorTransferFunction_h
52 #include "vtkRenderingCoreModule.h"
80 { this->SetIndexedColor(
index, rgb[0], rgb[1], rgb[2]); }
82 { this->SetIndexedColor(
index, rgba[0], rgba[1], rgba[2], rgba[3]); }
135 vtkGetMacro(UseLogScale,
int);
171 int inputDataType,
int numberOfValues,
172 int inputIncrement,
int outputFormat)
override;
207 {
return this->UseLogScale; }
226 vtkSetMacro(EnableOpacityMapping,
bool)
227 vtkGetMacro(EnableOpacityMapping,
bool)
228 vtkBooleanMacro(EnableOpacityMapping,
bool)
262 bool EnableOpacityMapping;
265 void MapDataArrayToOpacity(
272 template<typename T, typename VectorGetter>
273 void MapVectorToOpacity (
274 VectorGetter getter, T* scalars,
int component,
275 int numberOfComponents,
vtkIdType numberOfTuples,
unsigned char* colors);
277 template<template<class> class VectorGetter>
278 void AllTypesMapVectorToOpacity (
281 int numberOfComponents,
vtkIdType numberOfTuples,
unsigned char* colors);
284 vtkInternals* Internals;
const unsigned char * MapValue(double v) override
Map one value through the lookup table and return a color defined as a RGBA unsigned char tuple (4 by...
unsigned int GetNumberOfIndexedColors()
void SetNumberOfIndexedColors(unsigned int count)
Set the number of indexed colors.
void SetNanColor(double r, double g, double b) override
Set the color to use when a NaN (not a number) is encountered.
void SetNanOpacity(double a) override
Set the opacity to use when a NaN (not a number) is encountered.
virtual void SetNanColor(double, double, double)
Set the RGB color to use when a NaN (not a number) is encountered.
record modification and/or execution time
dynamic, self-adjusting array of unsigned char
Hold a reference to a vtkObjectBase instance.
abstract superclass for arrays of numeric data
static vtkDiscretizableColorTransferFunction * New()
a combination of vtkColorTransferFunction and vtkLookupTable.
Defines a transfer function for mapping a property to an RGB color value.
void SetIndexedColorRGBA(unsigned int index, const double rgba[4])
vtkIdType GetNumberOfAvailableColors() override
Get the number of available colors for mapping to.
void PrintSelf(ostream &os, vtkIndent indent) override
Print method for vtkColorTransferFunction.
void SetNanColor(double rgb[3]) override
void GetIndexedColor(vtkIdType i, double rgba[4]) override
Get the "indexed color" assigned to an index.
virtual vtkPiecewiseFunction * GetScalarOpacityFunction() const
void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat) override
Map a set of scalars through the lookup table.
virtual void SetUseLogScale(int useLogScale)
Get/Set if log scale must be used while mapping scalars to colors.
a simple class to control print indentation
void GetColor(double v, double rgb[3]) override
Map one value through the lookup table and return the color as an RGB array of doubles between 0 and ...
void SetAlpha(double alpha) override
Specify an additional opacity (alpha) value to blend with.
int UsingLogScale() override
This should return 1 if the subclass is using log scale for mapping scalars to colors.
double GetOpacity(double v) override
Return the opacity of a given scalar.
int IsOpaque() override
Returns the negation of EnableOpacityMapping.
Defines a 1D piecewise function.
virtual void SetScalarOpacityFunction(vtkPiecewiseFunction *function)
Set/get the opacity function to use.
void SetIndexedColor(unsigned int index, double r, double g, double b, double a=1.0)
map scalar values into colors via a lookup table
void SetIndexedColorRGB(unsigned int index, const double rgb[3])
Add colors to use when IndexedLookup is true.
vtkTypeUInt32 vtkMTimeType
void Build() override
Generate discretized lookup table, if applicable.