46 #ifndef vtkDiscretizableColorTransferFunction_h 47 #define vtkDiscretizableColorTransferFunction_h 49 #include "vtkRenderingCoreModule.h" 77 { this->SetIndexedColor(
index, rgb[0], rgb[1], rgb[2]); }
79 { this->SetIndexedColor(
index, rgba[0], rgba[1], rgba[2], rgba[3]); }
80 void SetIndexedColor(
unsigned int index,
double r,
double g,
double b,
double a = 1.0);
102 void SetNumberOfIndexedColors(
unsigned int count);
103 unsigned int GetNumberOfIndexedColors();
112 void Build()
override;
131 virtual void SetUseLogScale(
int useLogScale);
132 vtkGetMacro(UseLogScale,
int);
149 const unsigned char *
MapValue(
double v)
override;
155 void GetColor(
double v,
double rgb[3])
override;
168 int inputDataType,
int numberOfValues,
169 int inputIncrement,
int outputFormat)
override;
186 void SetNanColor(
double r,
double g,
double b)
override;
197 {
return this->UseLogScale; }
216 vtkSetMacro(EnableOpacityMapping,
bool)
217 vtkGetMacro(EnableOpacityMapping,
bool)
218 vtkBooleanMacro(EnableOpacityMapping,
bool)
255 void MapDataArrayToOpacity(
262 template<
typename T,
typename VectorGetter>
263 void MapVectorToOpacity (
264 VectorGetter getter, T* scalars,
int component,
265 int numberOfComponents,
vtkIdType numberOfTuples,
unsigned char* colors);
267 template<
template<
class>
class VectorGetter>
268 void AllTypesMapVectorToOpacity (
271 int numberOfComponents,
vtkIdType numberOfTuples,
unsigned char* colors);
274 vtkInternals* Internals;
vtkTypeBool Discretize
Flag indicating whether transfer function is discretized.
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.
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.
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.
void SetIndexedColorRGBA(unsigned int index, const double rgba[4])
dynamic, self-adjusting array of unsigned char
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.
void SetIndexedColorRGB(unsigned int index, const double rgb[3])
Add colors to use when IndexedLookup is true.
vtkSmartPointer< vtkPiecewiseFunction > ScalarOpacityFunction
virtual void Build()
Perform any processing required (if any) before processing scalars.
vtkLookupTable * LookupTable
Internal lookup table used for some aspects of the color mapping.
const unsigned char * MapValue(double v) override
Map one value through the lookup table.