|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
   46 #ifndef vtkDiscretizableColorTransferFunction_h 
   47 #define vtkDiscretizableColorTransferFunction_h 
   50 #include "vtkRenderingCoreModule.h"  
   82     this->SetIndexedColor(
index, rgb[0], rgb[1], rgb[2]);
 
   86     this->SetIndexedColor(
index, rgba[0], rgba[1], rgba[2], rgba[3]);
 
   88   void SetIndexedColor(
unsigned int index, 
double r, 
double g, 
double b, 
double a = 1.0);
 
  110   void SetNumberOfIndexedColors(
unsigned int count);
 
  111   unsigned int GetNumberOfIndexedColors();
 
  120   void Build() 
override;
 
  139   virtual void SetUseLogScale(
int useLogScale);
 
  140   vtkGetMacro(UseLogScale, 
int);
 
  157   const unsigned char* 
MapValue(
double v) 
override;
 
  163   void GetColor(
double v, 
double rgb[3]) 
override;
 
  176     int numberOfValues, 
int inputIncrement, 
int outputFormat) 
override;
 
  193   void SetNanColor(
double r, 
double g, 
double b) 
override;
 
  227   vtkSetMacro(EnableOpacityMapping, 
bool);
 
  228   vtkGetMacro(EnableOpacityMapping, 
bool);
 
  229   vtkBooleanMacro(EnableOpacityMapping, 
bool);
 
  272   template <
typename T, 
typename VectorGetter>
 
  273   void MapVectorToOpacity(VectorGetter getter, T* scalars, 
int component, 
int numberOfComponents,
 
  274     vtkIdType numberOfTuples, 
unsigned char* colors);
 
  276   template <
template <
class> 
class VectorGetter>
 
  277   void AllTypesMapVectorToOpacity(
int scalarType, 
void* scalarsPtr, 
int component,
 
  278     int numberOfComponents, 
vtkIdType numberOfTuples, 
unsigned char* colors);
 
  281   vtkInternals* Internals;
 
  
double * GetColor(double x)
Returns an RGB color for the specified scalar value.
vtkTimeStamp LookupTableUpdateTime
static vtkColorTransferFunction * New()
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.
record modification and/or execution time
dynamic, self-adjusting array of unsigned char
vtkLookupTable * LookupTable
Internal lookup table used for some aspects of the color mapping.
vtkTypeBool 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.
void SetIndexedColorRGBA(unsigned int index, const double rgba[4])
virtual void SetAlpha(double alpha)
Specify an additional opacity (alpha) value to blend with.
bool EnableOpacityMapping
void GetIndexedColor(vtkIdType idx, double rgba[4]) override
Return a color given an integer index.
virtual double GetOpacity(double v)
Map one value through the lookup table and return the alpha value (the opacity) as a double between 0...
vtkIdType GetNumberOfAvailableColors() override
Get the number of available colors for mapping to.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
a simple class to control print indentation
int UsingLogScale() override
This should return 1 if the subclass is using log scale for mapping scalars to colors.
virtual void SetNanOpacity(double)
Get/Set the opacity to use when a NaN (not a number) is encountered.
Defines a 1D piecewise function.
Abstract superclass for all arrays.
void SetNanColor(const double rgb[3]) override
map scalar values into colors via a lookup table
const unsigned char * MapValue(double v) override
Map one value through the lookup table.
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.
void SetIndexedColorRGB(unsigned int index, const double rgb[3])
Add colors to use when IndexedLookup is true.
vtkIdType NumberOfValues
Number of values to use in discretized color map.
vtkSmartPointer< vtkPiecewiseFunction > ScalarOpacityFunction
vtkTypeUInt32 vtkMTimeType
virtual int IsOpaque()
Return true if all of the values defining the mapping have an opacity equal to 1.
void PrintSelf(ostream &os, vtkIndent indent) override
Print method for vtkColorTransferFunction.