 |
VTK
9.0.1
|
Go to the documentation of this file.
36 #ifndef vtkColorTransferFunction_h
37 #define vtkColorTransferFunction_h
39 #include "vtkRenderingCoreModule.h"
42 class vtkColorTransferFunctionInternals;
47 #define VTK_CTF_DIVERGING 3
48 #define VTK_CTF_LAB_CIEDE2000 4
49 #define VTK_CTF_STEP 5
51 #define VTK_CTF_LINEAR 0
52 #define VTK_CTF_LOG10 1
79 int AddRGBPoint(
double x,
double r,
double g,
double b);
80 int AddRGBPoint(
double x,
double r,
double g,
double b,
double midpoint,
double sharpness);
81 int AddHSVPoint(
double x,
double h,
double s,
double v);
82 int AddHSVPoint(
double x,
double h,
double s,
double v,
double midpoint,
double sharpness);
83 int RemovePoint(
double x);
92 double x1,
double r1,
double g1,
double b1,
double x2,
double r2,
double g2,
double b2);
94 double x1,
double h1,
double s1,
double v1,
double x2,
double h2,
double s2,
double v2);
100 void RemoveAllPoints();
106 void GetColor(
double x,
double rgb[3])
override;
112 double GetRedValue(
double x);
113 double GetGreenValue(
double x);
114 double GetBlueValue(
double x);
123 int GetNodeValue(
int index,
double val[6]);
124 int SetNodeValue(
int index,
double val[6]);
130 const unsigned char*
MapValue(
double v)
override;
139 arg1 = this->
Range[0];
140 arg2 = this->
Range[1];
150 int AdjustRange(
double range[2]);
159 void GetTable(
double x1,
double x2,
int n,
double* table);
160 void GetTable(
double x1,
double x2,
int n,
float* table);
161 const unsigned char* GetTable(
double x1,
double x2,
int n);
173 void BuildFunctionFromTable(
double x1,
double x2,
int size,
double* table);
209 vtkGetMacro(ColorSpace,
int);
221 vtkSetMacro(Scale,
int);
224 vtkGetMacro(Scale,
int);
233 vtkSetVector3Macro(NanColor,
double);
234 vtkGetVector3Macro(NanColor,
double);
242 vtkSetMacro(NanOpacity,
double);
243 vtkGetMacro(NanOpacity,
double);
254 this->SetNanColor(r, g, b);
255 this->SetNanOpacity(a);
260 this->SetNanColorRGBA(rgba[0], rgba[1], rgba[2], rgba[3]);
269 vtkSetVector3Macro(BelowRangeColor,
double);
270 vtkGetVector3Macro(BelowRangeColor,
double);
287 vtkSetVector3Macro(AboveRangeColor,
double);
288 vtkGetVector3Macro(AboveRangeColor,
double);
307 double* GetDataPointer();
314 void FillFromDataPointer(
int n,
double* ptr);
320 int numberOfValues,
int inputIncrement,
int outputIncrement)
override;
329 vtkBooleanMacro(AllowDuplicateScalars,
vtkTypeBool);
349 int EstimateMinNumberOfSamples(
double const& x1,
double const& x2);
393 double BelowRangeColor[3];
403 double AboveRangeColor[3];
423 unsigned char UnsignedCharRGBAValue[4];
451 void SortAndUpdateRange();
463 void MovePoint(
double oldX,
double newX);
468 double FindMinimumXDistance();
void SetColorSpaceToStep()
auto Range(IterablePtr iterable, Options &&... opts) -> typename detail::IterableTraits< typename detail::StripPointers< IterablePtr >::type >::RangeType
Generate an iterable STL proxy object for a VTK container.
virtual void GetRange(double _arg[2])
double * GetColor(double x)
Returns an RGB color for the specified scalar value.
void SetNanColorRGBA(double rgba[4])
vtkTypeBool UseBelowRangeColor
Flag indicating whether below-range color should be used.
void SetRange(double, double) override
Set the range of scalars being mapped.
vtkTypeBool AllowDuplicateScalars
If on, the same scalar value may have more than one node assigned to it.
void SetRange(const double rng[2]) override
virtual void SetNanColorRGBA(double r, double g, double b, double a)
Set the RGBA color to use when a NaN (not a number) is encountered.
record modification and/or execution time
void SetColorSpaceToDiverging()
vtkColorTransferFunctionInternals * Internal
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.
double NanOpacity
The opacity to use for not-a-number.
Defines a transfer function for mapping a property to an RGB color value.
virtual void GetIndexedColor(vtkIdType i, double rgba[4])
Get the "indexed color" assigned to an index.
void SetColorSpaceToLab()
#define VTK_CTF_LAB_CIEDE2000
#define VTK_SIZEHINT(...)
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.
vtkTypeBool UseAboveRangeColor
Flag indicating whether below-range color should be used.
Superclass for mapping scalar values to colors.
virtual const 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...
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...
virtual vtkIdType GetNumberOfAvailableColors()
Get the number of available colors for mapping to.
int ColorSpace
The color space in which interpolation is performed.
double * GetRange() override
Returns min and max position of all function points.
vtkTypeBool Clamping
Determines the function value outside of defined points Zero = always return 0.0 outside of defined p...
void SetColorSpaceToHSV()
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 SetColorSpaceToLabCIEDE2000()
virtual void GetRange(double &arg1, double &arg2)
static vtkScalarsToColors * New()
double * Function
Temporary array to store data from the nodes.
#define VTK_CTF_DIVERGING
vtkTypeBool HSVWrap
Specify if HSV is wrap or not.