42 #ifndef vtkColorTransferFunction_h 43 #define vtkColorTransferFunction_h 45 #include "vtkRenderingCoreModule.h" 48 class vtkColorTransferFunctionInternals;
53 #define VTK_CTF_DIVERGING 3 54 #define VTK_CTF_LAB_CIEDE2000 4 56 #define VTK_CTF_LINEAR 0 57 #define VTK_CTF_LOG10 1 84 int AddRGBPoint(
double x,
double r,
double g,
double b );
85 int AddRGBPoint(
double x,
double r,
double g,
double b,
86 double midpoint,
double sharpness );
87 int AddHSVPoint(
double x,
double h,
double s,
double v );
88 int AddHSVPoint(
double x,
double h,
double s,
double v,
89 double midpoint,
double sharpness );
90 int RemovePoint(
double x );
98 void AddRGBSegment(
double x1,
double r1,
double g1,
double b1,
99 double x2,
double r2,
double g2,
double b2 );
100 void AddHSVSegment(
double x1,
double h1,
double s1,
double v1,
101 double x2,
double h2,
double s2,
double v2 );
107 void RemoveAllPoints();
114 void GetColor(
double x,
double rgb[3])
override;
120 double GetRedValue(
double x );
121 double GetGreenValue(
double x );
122 double GetBlueValue(
double x );
131 int GetNodeValue(
int index,
double val[6] );
132 int SetNodeValue(
int index,
double val[6] );
138 unsigned char *
MapValue(
double v)
override;
144 double*
GetRange()
override {
return this->Range; }
147 arg1 = this->Range[0];
148 arg2 = this->Range[1];
161 int AdjustRange(
double range[2]);
170 void GetTable(
double x1,
double x2,
int n,
double* table );
171 void GetTable(
double x1,
double x2,
int n,
float* table );
172 const unsigned char *GetTable(
double x1,
double x2,
int n );
184 void BuildFunctionFromTable(
double x1,
double x2,
int size,
double *table );
195 vtkSetClampMacro( Clamping,
int, 0, 1 );
196 vtkGetMacro( Clamping,
int );
218 vtkGetMacro( ColorSpace,
int );
220 vtkGetMacro(HSVWrap,
int);
233 vtkGetMacro(Scale,
int);
242 vtkSetVector3Macro(NanColor,
double);
243 vtkGetVector3Macro(NanColor,
double);
251 vtkSetVector3Macro(BelowRangeColor,
double);
252 vtkGetVector3Macro(BelowRangeColor,
double);
260 vtkGetMacro(UseBelowRangeColor,
int);
269 vtkSetVector3Macro(AboveRangeColor,
double);
270 vtkGetVector3Macro(AboveRangeColor,
double);
278 vtkGetMacro(UseAboveRangeColor,
int);
289 double* GetDataPointer();
296 void FillFromDataPointer(
int n,
double* ptr);
302 int inputDataType,
int numberOfValues,
303 int inputIncrement,
int outputIncrement)
override;
311 vtkGetMacro(AllowDuplicateScalars,
int);
332 int EstimateMinNumberOfSamples(
double const & x1,
double const & x2);
371 double BelowRangeColor[3];
381 double AboveRangeColor[3];
401 unsigned char UnsignedCharRGBAValue[4];
429 void SortAndUpdateRange();
441 void MovePoint(
double oldX,
double newX);
446 double FindMinimumXDistance();
int Clamping
Determines the function value outside of defined points Zero = always return 0.0 outside of defined p...
int Scale
The color interpolation scale (linear or logarithmic).
record modification and/or execution time
void SetScaleToLinear()
Set the type of scale to use, linear or logarithmic.
virtual double * GetRange()
Sets/Gets the range of scalars that will be mapped.
virtual void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
An internal method typically not used in applications.
void SetRange(double, double) override
Set the range of scalars being mapped.
vtkColorTransferFunctionInternals * Internal
virtual unsigned char * MapValue(double v)
Map one value through the lookup table and return a color defined as an RGBA unsigned char tuple (4 b...
Superclass for mapping scalar values to colors.
int HSVWrap
Specify if HSV is wrap or not.
static vtkScalarsToColors * New()
double * GetColor(double x)
Returns an RGB color for the specified scalar value.
void SetColorSpaceToLab()
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging.
a simple class to control print indentation
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...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetColorSpaceToRGB()
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging.
virtual void GetRange(double _arg[2])
Returns min and max position of all function points.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
double * GetRange() override
Returns min and max position of all function points.
int AllowDuplicateScalars
If on, the same scalar value may have more than one node assigned to it.
virtual void GetRange(double &arg1, double &arg2)
Returns min and max position of all function points.
void SetColorSpaceToDiverging()
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging.
#define VTK_CTF_LAB_CIEDE2000
Defines a transfer function for mapping a property to an RGB color value.
int UseAboveRangeColor
Flag indicating whether below-range color should be used.
virtual void GetIndexedColor(vtkIdType i, double rgba[4])
Get the "indexed color" assigned to an index.
int TableSize
Temporary storage for the size of the table.
double * Function
Temporary array to store data from the nodes.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetScaleToLog10()
Set the type of scale to use, linear or logarithmic.
virtual void DeepCopy(vtkScalarsToColors *o)
Copy the contents from another object.
void SetColorSpaceToHSV()
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging.
int UseBelowRangeColor
Flag indicating whether below-range color should be used.
void SetRange(const double rng[2]) override
Sets/Gets the range of scalars that will be mapped.
#define VTK_CTF_DIVERGING
int ColorSpace
The color space in which interpolation is performed.
virtual vtkIdType GetNumberOfAvailableColors()
Get the number of available colors for mapping to.
void SetColorSpaceToLabCIEDE2000()
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging.