Go to the documentation of this file.
42 #ifndef vtkColorTransferFunction_h
43 #define vtkColorTransferFunction_h
45 #include "vtkRenderingCoreModule.h"
48 class vtkColorTransferFunctionInternals;
53 #define VTK_CTF_DIVERGING 3
55 #define VTK_CTF_LINEAR 0
56 #define VTK_CTF_LOG10 1
83 int AddRGBPoint(
double x,
double r,
double g,
double b );
84 int AddRGBPoint(
double x,
double r,
double g,
double b,
85 double midpoint,
double sharpness );
86 int AddHSVPoint(
double x,
double h,
double s,
double v );
87 int AddHSVPoint(
double x,
double h,
double s,
double v,
88 double midpoint,
double sharpness );
89 int RemovePoint(
double x );
97 void AddRGBSegment(
double x1,
double r1,
double g1,
double b1,
98 double x2,
double r2,
double g2,
double b2 );
99 void AddHSVSegment(
double x1,
double h1,
double s1,
double v1,
100 double x2,
double h2,
double s2,
double v2 );
106 void RemoveAllPoints();
113 void GetColor(
double x,
double rgb[3]);
119 double GetRedValue(
double x );
120 double GetGreenValue(
double x );
121 double GetBlueValue(
double x );
130 int GetNodeValue(
int index,
double val[6] );
131 int SetNodeValue(
int index,
double val[6] );
137 virtual unsigned char *
MapValue(
double v);
143 vtkGetVector2Macro( Range,
double );
151 int AdjustRange(
double range[2]);
160 void GetTable(
double x1,
double x2,
int n,
double* table );
161 void GetTable(
double x1,
double x2,
int n,
float* table );
162 const unsigned char *GetTable(
double x1,
double x2,
int n );
174 void BuildFunctionFromTable(
double x1,
double x2,
int size,
double *table );
185 vtkSetClampMacro( Clamping,
int, 0, 1 );
186 vtkGetMacro( Clamping,
int );
205 vtkGetMacro( ColorSpace,
int );
207 vtkGetMacro(HSVWrap,
int);
220 vtkGetMacro(Scale,
int);
229 vtkSetVector3Macro(NanColor,
double);
230 vtkGetVector3Macro(NanColor,
double);
238 vtkSetVector3Macro(BelowRangeColor,
double);
239 vtkGetVector3Macro(BelowRangeColor,
double);
247 vtkGetMacro(UseBelowRangeColor,
int);
256 vtkSetVector3Macro(AboveRangeColor,
double);
257 vtkGetVector3Macro(AboveRangeColor,
double);
265 vtkGetMacro(UseAboveRangeColor,
int);
276 double* GetDataPointer();
283 void FillFromDataPointer(
int n,
double* ptr);
289 int inputDataType,
int numberOfValues,
290 int inputIncrement,
int outputIncrement);
298 vtkGetMacro(AllowDuplicateScalars,
int);
319 int EstimateMinNumberOfSamples(
double const & x1,
double const & x2);
358 double BelowRangeColor[3];
368 double AboveRangeColor[3];
388 unsigned char UnsignedCharRGBAValue[4];
416 void SortAndUpdateRange();
428 void MovePoint(
double oldX,
double newX);
433 double FindMinimumXDistance();
double * GetColor(double x)
Returns an RGB color for the specified scalar value.
record modification and/or execution time
virtual unsigned char * MapValue(double v)
Map one value through the lookup table and return a color defined as a RGBA unsigned char tuple (4 by...
void SetColorSpaceToDiverging()
vtkColorTransferFunctionInternals * Internal
void SetRange(double rng[2])
int Scale
The color interpolation scale (linear or logarithmic).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int HSVWrap
Specify if HSV is wrap or not.
Defines a transfer function for mapping a property to an RGB color value.
virtual void SetRange(double, double)
Set the range of scalars being mapped.
virtual void GetIndexedColor(vtkIdType i, double rgba[4])
Get the "indexed color" assigned to an index.
void SetColorSpaceToLab()
virtual void DeepCopy(vtkScalarsToColors *o)
Copy the contents from another object.
void SetColorSpaceToRGB()
a simple class to control print indentation
int TableSize
Temporary storage for the size of the table.
int UseAboveRangeColor
Flag indicating whether below-range color should be used.
Superclass for mapping scalar values to colors.
virtual void GetColor(double v, double rgb[3])
Map one value through the lookup table and store the color as an RGB array of doubles between 0 and 1...
int UseBelowRangeColor
Flag indicating whether below-range color should be used.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
virtual vtkIdType GetNumberOfAvailableColors()
Get the number of available colors for mapping to.
int ColorSpace
The color space in which interpolation is performed.
void SetColorSpaceToHSV()
int Clamping
Determines the function value outside of defined points Zero = always return 0.0 outside of defined p...
virtual void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
An internal method typically not used in applications.
int AllowDuplicateScalars
If on, the same scalar value may have more than one node assigned to it.
static vtkScalarsToColors * New()
double * Function
Temporary array to store data from the nodes.
#define VTK_CTF_DIVERGING