49 #ifndef vtkDiscretizableColorTransferFunction_h 50 #define vtkDiscretizableColorTransferFunction_h 52 #include "vtkRenderingCoreModule.h" 80 { this->SetIndexedColor(
index, rgb[0], rgb[1], rgb[2]); }
81 void SetIndexedColor(
unsigned int index,
double r,
double g,
double b);
103 void SetNumberOfIndexedColors(
unsigned int count);
104 unsigned int GetNumberOfIndexedColors();
113 void Build()
override;
123 vtkGetMacro(Discretize,
int);
132 virtual void SetUseLogScale(
int useLogScale);
133 vtkGetMacro(UseLogScale,
int);
150 unsigned char *
MapValue(
double v)
override;
156 void GetColor(
double v,
double rgb[3])
override;
169 int inputDataType,
int numberOfValues,
170 int inputIncrement,
int outputFormat) VTK_OVERRIDE;
178 VTK_LEGACY(
double* GetRGBPoints());
195 void SetNanColor(
double r,
double g,
double b)
override;
206 {
return this->UseLogScale; }
226 vtkGetMacro(EnableOpacityMapping,
bool)
264 void MapDataArrayToOpacity(
271 template<
typename T,
typename VectorGetter>
272 void MapVectorToOpacity (
273 VectorGetter getter, T* scalars,
int component,
274 int numberOfComponents,
vtkIdType numberOfTuples,
unsigned char* colors);
276 template<
template<
class>
class VectorGetter>
277 void AllTypesMapVectorToOpacity (
280 int numberOfComponents,
vtkIdType numberOfTuples,
unsigned char* colors);
283 vtkInternals* Internals;
int UseLogScale
Flag indicating whether log scaling is to be used.
Defines a 1D piecewise function.
vtkTypeUInt32 vtkMTimeType
void PrintSelf(ostream &os, vtkIndent indent) override
Print method for vtkColorTransferFunction.
void GetIndexedColor(vtkIdType idx, double rgba[4]) override
Return a color given an integer index.
record modification and/or execution time
static vtkColorTransferFunction * New()
map scalar values into colors via a lookup table
virtual void SetAlpha(double alpha)
Specify an additional opacity (alpha) value to blend with.
int Discretize
Flag indicating whether transfer function is discretized.
vtkIdType NumberOfValues
Number of values to use in discretized color map.
void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement) override
Map a set of scalars through the lookup table.
virtual void SetNanColor(double, double, double)
Set the RGB color to use when a NaN (not a number) is encountered.
unsigned char * MapValue(double v) override
Map one value through the lookup table.
vtkTimeStamp LookupTableUpdateTime
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 int IsOpaque()
Return true if all of the values defining the mapping have an opacity equal to 1.
double * GetColor(double x)
Returns an RGB color for the specified scalar value.
void SetNanColor(double rgb[3]) override
Set the color to use when a NaN (not a number) is encountered.
bool EnableOpacityMapping
a simple class to control print indentation
abstract superclass for arrays of numeric data
virtual vtkMTimeType GetMTime()
Return this object's modified time.
int UsingLogScale() override
This should return 1 if the subclass is using log scale for mapping scalars to colors.
dynamic, self-adjusting array of unsigned char
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkIdType GetNumberOfAvailableColors() override
Get the number of available colors for mapping to.
a combination of vtkColorTransferFunction and vtkLookupTable.
Defines a transfer function for mapping a property to an RGB color value.
vtkSmartPointer< vtkPiecewiseFunction > ScalarOpacityFunction
virtual void Build()
Perform any processing required (if any) before processing scalars.
void SetIndexedColor(unsigned int index, const double rgb[3])
Add colors to use when IndexedLookup is true.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkLookupTable * LookupTable
Internal lookup table used for some aspects of the color mapping.