VTK  9.1.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkColorTransferFunction Class Reference

Defines a transfer function for mapping a property to an RGB color value. More...

#include <vtkColorTransferFunction.h>

Inheritance diagram for vtkColorTransferFunction:
[legend]
Collaboration diagram for vtkColorTransferFunction:
[legend]

Public Types

typedef vtkScalarsToColors Superclass
 
- Public Types inherited from vtkScalarsToColors
enum  VectorModes { MAGNITUDE = 0 , COMPONENT = 1 , RGBCOLORS = 2 }
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkColorTransferFunctionNewInstance () const
 
void DeepCopy (vtkScalarsToColors *f) override
 Copy the contents from another object.
 
void ShallowCopy (vtkColorTransferFunction *f)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Print method for vtkColorTransferFunction.
 
int GetSize ()
 How many nodes define this function?
 
void RemoveAllPoints ()
 Remove all points.
 
double * GetColor (double x)
 Returns an RGB color for the specified scalar value.
 
void GetColor (double x, double rgb[3]) override
 Map one value through the lookup table and store the color as an RGB array of doubles between 0 and 1 in the rgb argument.
 
const unsigned char * MapValue (double v) override
 Map one value through the lookup table.
 
int AdjustRange (double range[2])
 Remove all points out of the new range, and make sure there is a point at each end of that range.
 
void BuildFunctionFromTable (double x1, double x2, int size, double *table)
 Construct a color transfer function from a table.
 
double * GetDataPointer ()
 Returns a pointer to an array of all node values in an interleaved array with the layout [X1, R1, G1, B1, X2, R2, G2, B2, ..., Xn, Rn, Gn, Bn] where n is the number of nodes defining the transfer function.
 
void FillFromDataPointer (int n, double *ptr)
 Defines the nodes from an array ptr with the layout [X1, R1, G1, B1, X2, R2, G2, B2, ..., Xn, Rn, Gn, Bn] where n is the number of nodes.
 
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.
 
vtkIdType GetNumberOfAvailableColors () override
 Get the number of available colors for mapping to.
 
void GetIndexedColor (vtkIdType idx, double rgba[4]) override
 Return a color given an integer index.
 
int EstimateMinNumberOfSamples (double const &x1, double const &x2)
 Estimates the minimum size of a table such that it would correctly sample this function.
 
int AddRGBPoint (double x, double r, double g, double b)
 Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.
 
int AddRGBPoint (double x, double r, double g, double b, double midpoint, double sharpness)
 Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.
 
int AddHSVPoint (double x, double h, double s, double v)
 Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.
 
int AddHSVPoint (double x, double h, double s, double v, double midpoint, double sharpness)
 Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.
 
int RemovePoint (double x)
 Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.
 
void AddRGBSegment (double x1, double r1, double g1, double b1, double x2, double r2, double g2, double b2)
 Add two points to the function and remove all the points between them.
 
void AddHSVSegment (double x1, double h1, double s1, double v1, double x2, double h2, double s2, double v2)
 Add two points to the function and remove all the points between them.
 
double GetRedValue (double x)
 Get the color components individually.
 
double GetGreenValue (double x)
 Get the color components individually.
 
double GetBlueValue (double x)
 Get the color components individually.
 
int GetNodeValue (int index, double val[6])
 For the node specified by index, set/get the location (X), R, G, and B values, midpoint, and sharpness values at the node.
 
int SetNodeValue (int index, double val[6])
 For the node specified by index, set/get the location (X), R, G, and B values, midpoint, and sharpness values at the node.
 
double * GetRange () override
 Returns min and max position of all function points.
 
virtual void GetRange (double &arg1, double &arg2)
 Returns min and max position of all function points.
 
virtual void GetRange (double _arg[2])
 Returns min and max position of all function points.
 
void GetTable (double x1, double x2, int n, double *table)
 Fills in a table of n colors mapped from values mapped with even spacing between x1 and x2, inclusive.
 
void GetTable (double x1, double x2, int n, float *table)
 Fills in a table of n colors mapped from values mapped with even spacing between x1 and x2, inclusive.
 
const unsigned char * GetTable (double x1, double x2, int n)
 Fills in a table of n colors mapped from values mapped with even spacing between x1 and x2, inclusive.
 
virtual void SetClamping (vtkTypeBool)
 Sets/gets whether clamping is used.
 
virtual vtkTypeBool GetClamping ()
 Sets/gets whether clamping is used.
 
virtual void ClampingOn ()
 Sets/gets whether clamping is used.
 
virtual void ClampingOff ()
 Sets/gets whether clamping is used.
 
virtual void SetColorSpace (int)
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
void SetColorSpaceToRGB ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
void SetColorSpaceToHSV ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
void SetColorSpaceToLab ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
void SetColorSpaceToLabCIEDE2000 ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
void SetColorSpaceToDiverging ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
void SetColorSpaceToStep ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
virtual int GetColorSpace ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
virtual void SetHSVWrap (vtkTypeBool)
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
virtual vtkTypeBool GetHSVWrap ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
virtual void HSVWrapOn ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
virtual void HSVWrapOff ()
 Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.
 
virtual void SetScale (int)
 Set the type of scale to use, linear or logarithmic.
 
void SetScaleToLinear ()
 Set the type of scale to use, linear or logarithmic.
 
void SetScaleToLog10 ()
 Set the type of scale to use, linear or logarithmic.
 
virtual int GetScale ()
 Set the type of scale to use, linear or logarithmic.
 
virtual void SetNanColor (double, double, double)
 Set the RGB color to use when a NaN (not a number) is encountered.
 
virtual void SetNanColor (double[3])
 Set the RGB color to use when a NaN (not a number) is encountered.
 
virtual double * GetNanColor ()
 Set the RGB color to use when a NaN (not a number) is encountered.
 
virtual void GetNanColor (double &, double &, double &)
 Set the RGB color to use when a NaN (not a number) is encountered.
 
virtual void GetNanColor (double[3])
 Set the RGB color to use when a NaN (not a number) is encountered.
 
virtual void SetNanOpacity (double)
 Get/Set the opacity to use when a NaN (not a number) is encountered.
 
virtual double GetNanOpacity ()
 Get/Set the opacity to use when a NaN (not a number) is encountered.
 
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.
 
void SetNanColorRGBA (double rgba[4])
 Set the RGBA color to use when a NaN (not a number) is encountered.
 
virtual void SetBelowRangeColor (double, double, double)
 Set the color to use when a value below the range is encountered.
 
virtual void SetBelowRangeColor (double[3])
 Set the color to use when a value below the range is encountered.
 
virtual double * GetBelowRangeColor ()
 Set the color to use when a value below the range is encountered.
 
virtual void GetBelowRangeColor (double &, double &, double &)
 Set the color to use when a value below the range is encountered.
 
virtual void GetBelowRangeColor (double[3])
 Set the color to use when a value below the range is encountered.
 
virtual void SetUseBelowRangeColor (vtkTypeBool)
 Set whether the below range color should be used.
 
virtual vtkTypeBool GetUseBelowRangeColor ()
 Set whether the below range color should be used.
 
virtual void UseBelowRangeColorOn ()
 Set whether the below range color should be used.
 
virtual void UseBelowRangeColorOff ()
 Set whether the below range color should be used.
 
virtual void SetAboveRangeColor (double, double, double)
 Set the color to use when a value above the range is encountered.
 
virtual void SetAboveRangeColor (double[3])
 Set the color to use when a value above the range is encountered.
 
virtual double * GetAboveRangeColor ()
 Set the color to use when a value above the range is encountered.
 
virtual void GetAboveRangeColor (double &, double &, double &)
 Set the color to use when a value above the range is encountered.
 
virtual void GetAboveRangeColor (double[3])
 Set the color to use when a value above the range is encountered.
 
virtual void SetUseAboveRangeColor (vtkTypeBool)
 Set whether the below range color should be used.
 
virtual vtkTypeBool GetUseAboveRangeColor ()
 Set whether the below range color should be used.
 
virtual void UseAboveRangeColorOn ()
 Set whether the below range color should be used.
 
virtual void UseAboveRangeColorOff ()
 Set whether the below range color should be used.
 
virtual void SetAllowDuplicateScalars (vtkTypeBool)
 Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
 
virtual vtkTypeBool GetAllowDuplicateScalars ()
 Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
 
virtual void AllowDuplicateScalarsOn ()
 Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
 
virtual void AllowDuplicateScalarsOff ()
 Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
 
- Public Member Functions inherited from vtkScalarsToColors
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkScalarsToColorsNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
virtual void Build ()
 Perform any processing required (if any) before processing scalars.
 
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 bytes).
 
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 in the rgb argument.
 
double * GetColor (double v)
 Map one value through the lookup table and return the color as an RGB array of doubles between 0 and 1.
 
virtual double GetOpacity (double v)
 Map one value through the lookup table and return the alpha value (the opacity) as a double between 0 and 1.
 
double GetLuminance (double x)
 Map one value through the lookup table and return the luminance 0.3*red + 0.59*green + 0.11*blue as a double between 0 and 1.
 
void MapVectorsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat, int vectorComponent, int vectorSize)
 Map vectors through the lookup table.
 
void MapVectorsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
 
void MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output, int outputFormat)
 Map a set of scalars through the lookup table in a single operation.
 
void MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output)
 
void MapScalarsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
 
virtual void MapScalarsThroughTable2 (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
 An internal method typically not used in applications.
 
virtual void DeepCopy (vtkScalarsToColors *o)
 Copy the contents from another object.
 
virtual int UsingLogScale ()
 This should return 1 is the subclass is using log scale for mapping scalars to colors.
 
virtual vtkIdType GetNumberOfAvailableColors ()
 Get the number of available colors for mapping to.
 
virtual vtkIdType SetAnnotation (vtkVariant value, vtkStdString annotation)
 Add a new entry (or change an existing entry) to the list of annotated values.
 
virtual vtkIdType SetAnnotation (vtkStdString value, vtkStdString annotation)
 This variant of SetAnnotation accepts the value as a string so ParaView can treat annotations as string vector arrays.
 
vtkIdType GetNumberOfAnnotatedValues ()
 Return the annotated value at a particular index in the list of annotations.
 
vtkVariant GetAnnotatedValue (vtkIdType idx)
 Return the annotated value at a particular index in the list of annotations.
 
vtkStdString GetAnnotation (vtkIdType idx)
 Return the annotation at a particular index in the list of annotations.
 
virtual void GetAnnotationColor (const vtkVariant &val, double rgba[4])
 Obtain the color associated with a particular annotated value (or NanColor if unmatched).
 
vtkIdType GetAnnotatedValueIndex (vtkVariant val)
 Return the index of the given value in the list of annotated values (or -1 if not present).
 
vtkIdType GetAnnotatedValueIndexInternal (const vtkVariant &val)
 Look up an index into the array of annotations given a value.
 
virtual void GetIndexedColor (vtkIdType i, double rgba[4])
 Get the "indexed color" assigned to an index.
 
virtual bool RemoveAnnotation (vtkVariant value)
 Remove an existing entry from the list of annotated values.
 
virtual void ResetAnnotations ()
 Remove all existing values and their annotations.
 
virtual int IsOpaque ()
 Return true if all of the values defining the mapping have an opacity equal to 1.
 
virtual int IsOpaque (vtkAbstractArray *scalars, int colorMode, int component)
 Return true if all of the values defining the mapping have an opacity equal to 1.
 
virtual void SetAlpha (double alpha)
 Specify an additional opacity (alpha) value to blend with.
 
virtual double GetAlpha ()
 Specify an additional opacity (alpha) value to blend with.
 
virtual vtkUnsignedCharArrayMapScalars (vtkDataArray *scalars, int colorMode, int component, int outputFormat=VTK_RGBA)
 Internal methods that map a data array into an unsigned char array.
 
virtual vtkUnsignedCharArrayMapScalars (vtkAbstractArray *scalars, int colorMode, int component, int outputFormat=VTK_RGBA)
 Internal methods that map a data array into an unsigned char array.
 
virtual void SetVectorMode (int)
 Change mode that maps vectors by magnitude vs.
 
virtual int GetVectorMode ()
 Change mode that maps vectors by magnitude vs.
 
void SetVectorModeToMagnitude ()
 Change mode that maps vectors by magnitude vs.
 
void SetVectorModeToComponent ()
 Change mode that maps vectors by magnitude vs.
 
void SetVectorModeToRGBColors ()
 Change mode that maps vectors by magnitude vs.
 
virtual void SetVectorComponent (int)
 If the mapper does not select which component of a vector to map to colors, you can specify it here.
 
virtual int GetVectorComponent ()
 If the mapper does not select which component of a vector to map to colors, you can specify it here.
 
virtual void SetVectorSize (int)
 When mapping vectors, consider only the number of components selected by VectorSize to be part of the vector, and ignore any other components.
 
virtual int GetVectorSize ()
 When mapping vectors, consider only the number of components selected by VectorSize to be part of the vector, and ignore any other components.
 
virtual void SetAnnotations (vtkAbstractArray *values, vtkStringArray *annotations)
 Set a list of discrete values, either as a categorical set of values (when IndexedLookup is true) or as a set of annotations to add to a scalar array (when IndexedLookup is false).
 
virtual vtkAbstractArrayGetAnnotatedValues ()
 Set a list of discrete values, either as a categorical set of values (when IndexedLookup is true) or as a set of annotations to add to a scalar array (when IndexedLookup is false).
 
virtual vtkStringArrayGetAnnotations ()
 Set a list of discrete values, either as a categorical set of values (when IndexedLookup is true) or as a set of annotations to add to a scalar array (when IndexedLookup is false).
 
virtual void SetIndexedLookup (vtkTypeBool)
 Set/get whether the lookup table is for categorical or ordinal data.
 
virtual vtkTypeBool GetIndexedLookup ()
 Set/get whether the lookup table is for categorical or ordinal data.
 
virtual void IndexedLookupOn ()
 Set/get whether the lookup table is for categorical or ordinal data.
 
virtual void IndexedLookupOff ()
 Set/get whether the lookup table is for categorical or ordinal data.
 
template<>
unsigned char ColorToUChar (double t)
 Specializations of vtkScalarsToColors::ColorToUChar Converts from a color in a floating point type in range 0.0-1.0 to a uchar in range 0-255.
 
template<>
unsigned char ColorToUChar (float t)
 Specializations of vtkScalarsToColors::ColorToUChar Converts from a color in a floating point type in range 0.0-1.0 to a uchar in range 0-255.
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on.
 
virtual void DebugOff ()
 Turn debugging output off.
 
bool GetDebug ()
 Get the value of the debug flag.
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag.
 
virtual void Modified ()
 Update the modification time for this object.
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method.
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string.
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
virtual void Delete ()
 Delete a VTK object.
 
virtual void FastDelete ()
 Delete a reference to this object.
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream.
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object).
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object).
 
int GetReferenceCount ()
 Return the current reference count of this object.
 
void SetReferenceCount (int)
 Sets the reference count.
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space.
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 

Static Public Member Functions

static vtkColorTransferFunctionNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkColorTransferFunctionSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkScalarsToColors
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkScalarsToColorsSafeDownCast (vtkObjectBase *o)
 
static vtkScalarsToColorsNew ()
 
template<typename T >
static unsigned char ColorToUChar (T t)
 Converts a color from numeric type T to uchar.
 
template<typename T >
static void ColorToUChar (T t, unsigned char *dest)
 Converts a color from numeric type T to uchar.
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class.
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkColorTransferFunction ()
 
 ~vtkColorTransferFunction () override
 
void SetRange (double, double) override
 Set the range of scalars being mapped.
 
void SetRange (const double rng[2]) override
 Sets/Gets the range of scalars that will be mapped.
 
void SortAndUpdateRange ()
 Internal method to sort the vector and update the Range whenever a node is added, edited or removed It always calls Modified().
 
bool UpdateRange ()
 Returns true if the range has been changed.
 
void MovePoint (double oldX, double newX)
 Moves point from oldX to newX.
 
double FindMinimumXDistance ()
 Traverses the nodes to find the minimum distance.
 
- Protected Member Functions inherited from vtkScalarsToColors
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkScalarsToColors ()
 
 ~vtkScalarsToColors () override
 
void MapColorsToColors (void *input, unsigned char *output, int inputDataType, int numberOfValues, int numberOfComponents, int vectorSize, int outputFormat)
 An internal method that assumes that the input already has the right colors, and only remaps the range to [0,255] and pads to the desired output format.
 
vtkUnsignedCharArrayConvertToRGBA (vtkDataArray *colors, int numComp, int numTuples)
 An internal method used to convert a color array to RGBA.
 
void MapVectorsToMagnitude (void *input, double *output, int inputDataType, int numberOfValues, int numberOfComponents, int vectorSize)
 An internal method for converting vectors to magnitudes, used as a preliminary step before doing magnitude mapping.
 
virtual vtkIdType CheckForAnnotatedValue (vtkVariant value)
 Allocate annotation arrays if needed, then return the index of the given value or -1 if not present.
 
virtual void UpdateAnnotatedValueMap ()
 Update the map from annotated values to indices in the array of annotations.
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events.
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkColorTransferFunctionInternals * Internal
 
vtkTypeBool Clamping
 Determines the function value outside of defined points Zero = always return 0.0 outside of defined points One = clamp to the lowest value below defined points and highest value above defined points.
 
int ColorSpace
 The color space in which interpolation is performed.
 
vtkTypeBool HSVWrap
 Specify if HSV is wrap or not.
 
int Scale
 The color interpolation scale (linear or logarithmic).
 
double NanColor [3]
 The color to use for not-a-number.
 
double NanOpacity
 The opacity to use for not-a-number.
 
double BelowRangeColor [3]
 The below-range color.
 
vtkTypeBool UseBelowRangeColor
 Flag indicating whether below-range color should be used.
 
double AboveRangeColor [3]
 The above-range color.
 
vtkTypeBool UseAboveRangeColor
 Flag indicating whether below-range color should be used.
 
double * Function
 Temporary array to store data from the nodes.
 
double Range [2]
 The min and max node locations.
 
unsigned char UnsignedCharRGBAValue [4]
 Temporary storage for an evaluated color (0 to 255 RGBA A=255)
 
vtkTypeBool AllowDuplicateScalars
 If on, the same scalar value may have more than one node assigned to it.
 
vtkTimeStamp BuildTime
 
unsigned char * Table
 
int TableSize
 Temporary storage for the size of the table.
 
- Protected Attributes inherited from vtkScalarsToColors
vtkAbstractArrayAnnotatedValues
 
vtkStringArrayAnnotations
 
vtkInternalAnnotatedValueList * AnnotatedValueList
 
vtkTypeBool IndexedLookup
 
double Alpha
 
int VectorMode
 
int VectorComponent
 
int VectorSize
 
int UseMagnitude
 
unsigned char RGBABytes [4]
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

Defines a transfer function for mapping a property to an RGB color value.

vtkColorTransferFunction is a color mapping in RGB or HSV space that uses piecewise hermite functions to allow interpolation that can be piecewise constant, piecewise linear, or somewhere in-between (a modified piecewise hermite function that squishes the function according to a sharpness parameter). The function also allows for the specification of the midpoint (the place where the function reaches the average of the two bounding nodes) as a normalize distance between nodes. See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.

See also
vtkPiecewiseFunction
Online Examples:

Definition at line 163 of file vtkColorTransferFunction.h.

Member Typedef Documentation

◆ Superclass

Definition at line 167 of file vtkColorTransferFunction.h.

Constructor & Destructor Documentation

◆ vtkColorTransferFunction()

vtkColorTransferFunction::vtkColorTransferFunction ( )
protected

◆ ~vtkColorTransferFunction()

vtkColorTransferFunction::~vtkColorTransferFunction ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkColorTransferFunction * vtkColorTransferFunction::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkColorTransferFunction::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkColorTransferFunction::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ SafeDownCast()

static vtkColorTransferFunction * vtkColorTransferFunction::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkColorTransferFunction::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ NewInstance()

vtkColorTransferFunction * vtkColorTransferFunction::NewInstance ( ) const

◆ DeepCopy()

void vtkColorTransferFunction::DeepCopy ( vtkScalarsToColors o)
overridevirtual

Copy the contents from another object.

Reimplemented from vtkScalarsToColors.

◆ ShallowCopy()

void vtkColorTransferFunction::ShallowCopy ( vtkColorTransferFunction f)

◆ PrintSelf()

void vtkColorTransferFunction::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Print method for vtkColorTransferFunction.

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ GetSize()

int vtkColorTransferFunction::GetSize ( )

How many nodes define this function?

◆ AddRGBPoint() [1/2]

int vtkColorTransferFunction::AddRGBPoint ( double  x,
double  r,
double  g,
double  b 
)

Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.

See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.

◆ AddRGBPoint() [2/2]

int vtkColorTransferFunction::AddRGBPoint ( double  x,
double  r,
double  g,
double  b,
double  midpoint,
double  sharpness 
)

Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.

See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.

◆ AddHSVPoint() [1/2]

int vtkColorTransferFunction::AddHSVPoint ( double  x,
double  h,
double  s,
double  v 
)

Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.

See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.

◆ AddHSVPoint() [2/2]

int vtkColorTransferFunction::AddHSVPoint ( double  x,
double  h,
double  s,
double  v,
double  midpoint,
double  sharpness 
)

Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.

See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.

◆ RemovePoint()

int vtkColorTransferFunction::RemovePoint ( double  x)

Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.

See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.

◆ AddRGBSegment()

void vtkColorTransferFunction::AddRGBSegment ( double  x1,
double  r1,
double  g1,
double  b1,
double  x2,
double  r2,
double  g2,
double  b2 
)

Add two points to the function and remove all the points between them.

◆ AddHSVSegment()

void vtkColorTransferFunction::AddHSVSegment ( double  x1,
double  h1,
double  s1,
double  v1,
double  x2,
double  h2,
double  s2,
double  v2 
)

Add two points to the function and remove all the points between them.

◆ RemoveAllPoints()

void vtkColorTransferFunction::RemoveAllPoints ( )

Remove all points.

◆ GetColor() [1/2]

double * vtkColorTransferFunction::GetColor ( double  x)
inline

Returns an RGB color for the specified scalar value.

Definition at line 214 of file vtkColorTransferFunction.h.

◆ GetColor() [2/2]

void vtkColorTransferFunction::GetColor ( double  v,
double  rgb[3] 
)
overridevirtual

Map one value through the lookup table and store the color as an RGB array of doubles between 0 and 1 in the rgb argument.

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ GetRedValue()

double vtkColorTransferFunction::GetRedValue ( double  x)

Get the color components individually.

◆ GetGreenValue()

double vtkColorTransferFunction::GetGreenValue ( double  x)

Get the color components individually.

◆ GetBlueValue()

double vtkColorTransferFunction::GetBlueValue ( double  x)

Get the color components individually.

◆ GetNodeValue()

int vtkColorTransferFunction::GetNodeValue ( int  index,
double  val[6] 
)

For the node specified by index, set/get the location (X), R, G, and B values, midpoint, and sharpness values at the node.

◆ SetNodeValue()

int vtkColorTransferFunction::SetNodeValue ( int  index,
double  val[6] 
)

For the node specified by index, set/get the location (X), R, G, and B values, midpoint, and sharpness values at the node.

◆ MapValue()

const unsigned char * vtkColorTransferFunction::MapValue ( double  v)
overridevirtual

Map one value through the lookup table.

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ GetRange() [1/3]

double * vtkColorTransferFunction::GetRange ( )
inlineoverridevirtual

Returns min and max position of all function points.

Reimplemented from vtkScalarsToColors.

Definition at line 245 of file vtkColorTransferFunction.h.

◆ GetRange() [2/3]

virtual void vtkColorTransferFunction::GetRange ( double &  arg1,
double &  arg2 
)
inlinevirtual

Returns min and max position of all function points.

Definition at line 246 of file vtkColorTransferFunction.h.

◆ GetRange() [3/3]

virtual void vtkColorTransferFunction::GetRange ( double  _arg[2])
inlinevirtual

Returns min and max position of all function points.

Definition at line 251 of file vtkColorTransferFunction.h.

◆ AdjustRange()

int vtkColorTransferFunction::AdjustRange ( double  range[2])

Remove all points out of the new range, and make sure there is a point at each end of that range.

Returns 1 on success, 0 otherwise.

◆ GetTable() [1/3]

void vtkColorTransferFunction::GetTable ( double  x1,
double  x2,
int  n,
double *  table 
)

Fills in a table of n colors mapped from values mapped with even spacing between x1 and x2, inclusive.

Note that GetTable ignores IndexedLookup

◆ GetTable() [2/3]

void vtkColorTransferFunction::GetTable ( double  x1,
double  x2,
int  n,
float *  table 
)

Fills in a table of n colors mapped from values mapped with even spacing between x1 and x2, inclusive.

Note that GetTable ignores IndexedLookup

◆ GetTable() [3/3]

const unsigned char * vtkColorTransferFunction::GetTable ( double  x1,
double  x2,
int  n 
)

Fills in a table of n colors mapped from values mapped with even spacing between x1 and x2, inclusive.

Note that GetTable ignores IndexedLookup

◆ BuildFunctionFromTable()

void vtkColorTransferFunction::BuildFunctionFromTable ( double  x1,
double  x2,
int  size,
double *  table 
)

Construct a color transfer function from a table.

Unlike FillFromDataPointer(), the table parameter's layout is assumed to be [R1, G1, B1, R2, G2, B2, ..., Rn, Gn, Bn], and it is assumed to be a block of memory of size [3*size]. After calling this method, the function range will be [x1, x2], the function will have size nodes, and function values will be regularly spaced between x1 and x2.

◆ SetClamping()

virtual void vtkColorTransferFunction::SetClamping ( vtkTypeBool  )
virtual

Sets/gets whether clamping is used.

If on, scalar values below the lower range value set for the transfer function will be mapped to the first node color, and scalar values above the upper range value set for the transfer function will be mapped to the last node color. If off, values outside the range are mapped to black.

◆ GetClamping()

virtual vtkTypeBool vtkColorTransferFunction::GetClamping ( )
virtual

Sets/gets whether clamping is used.

If on, scalar values below the lower range value set for the transfer function will be mapped to the first node color, and scalar values above the upper range value set for the transfer function will be mapped to the last node color. If off, values outside the range are mapped to black.

◆ ClampingOn()

virtual void vtkColorTransferFunction::ClampingOn ( )
virtual

Sets/gets whether clamping is used.

If on, scalar values below the lower range value set for the transfer function will be mapped to the first node color, and scalar values above the upper range value set for the transfer function will be mapped to the last node color. If off, values outside the range are mapped to black.

◆ ClampingOff()

virtual void vtkColorTransferFunction::ClampingOff ( )
virtual

Sets/gets whether clamping is used.

If on, scalar values below the lower range value set for the transfer function will be mapped to the first node color, and scalar values above the upper range value set for the transfer function will be mapped to the last node color. If off, values outside the range are mapped to black.

◆ SetColorSpace()

virtual void vtkColorTransferFunction::SetColorSpace ( int  )
virtual

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

◆ SetColorSpaceToRGB()

void vtkColorTransferFunction::SetColorSpaceToRGB ( )
inline

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

Definition at line 312 of file vtkColorTransferFunction.h.

◆ SetColorSpaceToHSV()

void vtkColorTransferFunction::SetColorSpaceToHSV ( )
inline

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

Definition at line 313 of file vtkColorTransferFunction.h.

◆ SetColorSpaceToLab()

void vtkColorTransferFunction::SetColorSpaceToLab ( )
inline

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

Definition at line 314 of file vtkColorTransferFunction.h.

◆ SetColorSpaceToLabCIEDE2000()

void vtkColorTransferFunction::SetColorSpaceToLabCIEDE2000 ( )
inline

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

Definition at line 315 of file vtkColorTransferFunction.h.

◆ SetColorSpaceToDiverging()

void vtkColorTransferFunction::SetColorSpaceToDiverging ( )
inline

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

Definition at line 316 of file vtkColorTransferFunction.h.

◆ SetColorSpaceToStep()

void vtkColorTransferFunction::SetColorSpaceToStep ( )
inline

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

Definition at line 317 of file vtkColorTransferFunction.h.

◆ GetColorSpace()

virtual int vtkColorTransferFunction::GetColorSpace ( )
virtual

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

◆ SetHSVWrap()

virtual void vtkColorTransferFunction::SetHSVWrap ( vtkTypeBool  )
virtual

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

◆ GetHSVWrap()

virtual vtkTypeBool vtkColorTransferFunction::GetHSVWrap ( )
virtual

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

◆ HSVWrapOn()

virtual void vtkColorTransferFunction::HSVWrapOn ( )
virtual

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

◆ HSVWrapOff()

virtual void vtkColorTransferFunction::HSVWrapOff ( )
virtual

Set/Get the color space used for interpolation: RGB, HSV, CIELAB, Diverging or Step.

In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). In Lab/CIEDE2000 mode, it will take the shortest path in the Lab color space with respect to the CIE Delta E 2000 color distance measure. Diverging is a special mode where colors will pass through white when interpolating between two saturated colors. Step is a mode where the color of an interval is the color of the second color of the interval.

◆ SetScale()

virtual void vtkColorTransferFunction::SetScale ( int  )
virtual

Set the type of scale to use, linear or logarithmic.

The default is linear. If the scale is logarithmic, and the range contains zero, the color mapping will be linear.

◆ SetScaleToLinear()

void vtkColorTransferFunction::SetScaleToLinear ( )
inline

Set the type of scale to use, linear or logarithmic.

The default is linear. If the scale is logarithmic, and the range contains zero, the color mapping will be linear.

Definition at line 331 of file vtkColorTransferFunction.h.

◆ SetScaleToLog10()

void vtkColorTransferFunction::SetScaleToLog10 ( )
inline

Set the type of scale to use, linear or logarithmic.

The default is linear. If the scale is logarithmic, and the range contains zero, the color mapping will be linear.

Definition at line 332 of file vtkColorTransferFunction.h.

◆ GetScale()

virtual int vtkColorTransferFunction::GetScale ( )
virtual

Set the type of scale to use, linear or logarithmic.

The default is linear. If the scale is logarithmic, and the range contains zero, the color mapping will be linear.

◆ SetNanColor() [1/2]

virtual void vtkColorTransferFunction::SetNanColor ( double  ,
double  ,
double   
)
virtual

Set the RGB color to use when a NaN (not a number) is encountered.

This is an RGB 3-tuple color of doubles in the range [0,1].

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ SetNanColor() [2/2]

virtual void vtkColorTransferFunction::SetNanColor ( double  [3])
virtual

Set the RGB color to use when a NaN (not a number) is encountered.

This is an RGB 3-tuple color of doubles in the range [0,1].

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ GetNanColor() [1/3]

virtual double * vtkColorTransferFunction::GetNanColor ( )
virtual

Set the RGB color to use when a NaN (not a number) is encountered.

This is an RGB 3-tuple color of doubles in the range [0,1].

◆ GetNanColor() [2/3]

virtual void vtkColorTransferFunction::GetNanColor ( double &  ,
double &  ,
double &   
)
virtual

Set the RGB color to use when a NaN (not a number) is encountered.

This is an RGB 3-tuple color of doubles in the range [0,1].

◆ GetNanColor() [3/3]

virtual void vtkColorTransferFunction::GetNanColor ( double  [3])
virtual

Set the RGB color to use when a NaN (not a number) is encountered.

This is an RGB 3-tuple color of doubles in the range [0,1].

◆ SetNanOpacity()

virtual void vtkColorTransferFunction::SetNanOpacity ( double  )
virtual

Get/Set the opacity to use when a NaN (not a number) is encountered.

This a double in the range [0,1].

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ GetNanOpacity()

virtual double vtkColorTransferFunction::GetNanOpacity ( )
virtual

Get/Set the opacity to use when a NaN (not a number) is encountered.

This a double in the range [0,1].

◆ SetNanColorRGBA() [1/2]

virtual void vtkColorTransferFunction::SetNanColorRGBA ( double  r,
double  g,
double  b,
double  a 
)
inlinevirtual

Set the RGBA color to use when a NaN (not a number) is encountered.

This is an RGBA 4-tuple color of doubles in the range [0,1].

Definition at line 361 of file vtkColorTransferFunction.h.

◆ SetNanColorRGBA() [2/2]

void vtkColorTransferFunction::SetNanColorRGBA ( double  rgba[4])
inline

Set the RGBA color to use when a NaN (not a number) is encountered.

This is an RGBA 4-tuple color of doubles in the range [0,1].

Definition at line 367 of file vtkColorTransferFunction.h.

◆ SetBelowRangeColor() [1/2]

virtual void vtkColorTransferFunction::SetBelowRangeColor ( double  ,
double  ,
double   
)
virtual

Set the color to use when a value below the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ SetBelowRangeColor() [2/2]

virtual void vtkColorTransferFunction::SetBelowRangeColor ( double  [3])
virtual

Set the color to use when a value below the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ GetBelowRangeColor() [1/3]

virtual double * vtkColorTransferFunction::GetBelowRangeColor ( )
virtual

Set the color to use when a value below the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ GetBelowRangeColor() [2/3]

virtual void vtkColorTransferFunction::GetBelowRangeColor ( double &  ,
double &  ,
double &   
)
virtual

Set the color to use when a value below the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ GetBelowRangeColor() [3/3]

virtual void vtkColorTransferFunction::GetBelowRangeColor ( double  [3])
virtual

Set the color to use when a value below the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ SetUseBelowRangeColor()

virtual void vtkColorTransferFunction::SetUseBelowRangeColor ( vtkTypeBool  )
virtual

Set whether the below range color should be used.

◆ GetUseBelowRangeColor()

virtual vtkTypeBool vtkColorTransferFunction::GetUseBelowRangeColor ( )
virtual

Set whether the below range color should be used.

◆ UseBelowRangeColorOn()

virtual void vtkColorTransferFunction::UseBelowRangeColorOn ( )
virtual

Set whether the below range color should be used.

◆ UseBelowRangeColorOff()

virtual void vtkColorTransferFunction::UseBelowRangeColorOff ( )
virtual

Set whether the below range color should be used.

◆ SetAboveRangeColor() [1/2]

virtual void vtkColorTransferFunction::SetAboveRangeColor ( double  ,
double  ,
double   
)
virtual

Set the color to use when a value above the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ SetAboveRangeColor() [2/2]

virtual void vtkColorTransferFunction::SetAboveRangeColor ( double  [3])
virtual

Set the color to use when a value above the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ GetAboveRangeColor() [1/3]

virtual double * vtkColorTransferFunction::GetAboveRangeColor ( )
virtual

Set the color to use when a value above the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ GetAboveRangeColor() [2/3]

virtual void vtkColorTransferFunction::GetAboveRangeColor ( double &  ,
double &  ,
double &   
)
virtual

Set the color to use when a value above the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ GetAboveRangeColor() [3/3]

virtual void vtkColorTransferFunction::GetAboveRangeColor ( double  [3])
virtual

Set the color to use when a value above the range is encountered.

This is an RGB 3-tuple of doubles in the range [0, 1].

◆ SetUseAboveRangeColor()

virtual void vtkColorTransferFunction::SetUseAboveRangeColor ( vtkTypeBool  )
virtual

Set whether the below range color should be used.

◆ GetUseAboveRangeColor()

virtual vtkTypeBool vtkColorTransferFunction::GetUseAboveRangeColor ( )
virtual

Set whether the below range color should be used.

◆ UseAboveRangeColorOn()

virtual void vtkColorTransferFunction::UseAboveRangeColorOn ( )
virtual

Set whether the below range color should be used.

◆ UseAboveRangeColorOff()

virtual void vtkColorTransferFunction::UseAboveRangeColorOff ( )
virtual

Set whether the below range color should be used.

◆ GetDataPointer()

double * vtkColorTransferFunction::GetDataPointer ( )

Returns a pointer to an array of all node values in an interleaved array with the layout [X1, R1, G1, B1, X2, R2, G2, B2, ..., Xn, Rn, Gn, Bn] where n is the number of nodes defining the transfer function.

The returned pointer points to an array that is managed by this class, so callers should not free it.

◆ FillFromDataPointer()

void vtkColorTransferFunction::FillFromDataPointer ( int  n,
double *  ptr 
)

Defines the nodes from an array ptr with the layout [X1, R1, G1, B1, X2, R2, G2, B2, ..., Xn, Rn, Gn, Bn] where n is the number of nodes.

◆ MapScalarsThroughTable2()

void vtkColorTransferFunction::MapScalarsThroughTable2 ( void *  input,
unsigned char *  output,
int  inputDataType,
int  numberOfValues,
int  inputIncrement,
int  outputIncrement 
)
overridevirtual

Map a set of scalars through the lookup table.

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ SetAllowDuplicateScalars()

virtual void vtkColorTransferFunction::SetAllowDuplicateScalars ( vtkTypeBool  )
virtual

Toggle whether to allow duplicate scalar values in the color transfer function (off by default).

◆ GetAllowDuplicateScalars()

virtual vtkTypeBool vtkColorTransferFunction::GetAllowDuplicateScalars ( )
virtual

Toggle whether to allow duplicate scalar values in the color transfer function (off by default).

◆ AllowDuplicateScalarsOn()

virtual void vtkColorTransferFunction::AllowDuplicateScalarsOn ( )
virtual

Toggle whether to allow duplicate scalar values in the color transfer function (off by default).

◆ AllowDuplicateScalarsOff()

virtual void vtkColorTransferFunction::AllowDuplicateScalarsOff ( )
virtual

Toggle whether to allow duplicate scalar values in the color transfer function (off by default).

◆ GetNumberOfAvailableColors()

vtkIdType vtkColorTransferFunction::GetNumberOfAvailableColors ( )
overridevirtual

Get the number of available colors for mapping to.

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ GetIndexedColor()

void vtkColorTransferFunction::GetIndexedColor ( vtkIdType  idx,
double  rgba[4] 
)
overridevirtual

Return a color given an integer index.

This is used to assign colors to annotations (given an offset into the list of annotations). If there are no control points or idx < 0, then NanColor is returned.

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkDiscretizableColorTransferFunction.

◆ EstimateMinNumberOfSamples()

int vtkColorTransferFunction::EstimateMinNumberOfSamples ( double const &  x1,
double const &  x2 
)

Estimates the minimum size of a table such that it would correctly sample this function.

The returned value should be passed as parameter 'n' when calling GetTable().

◆ SetRange() [1/2]

void vtkColorTransferFunction::SetRange ( double  ,
double   
)
inlineoverrideprotectedvirtual

Set the range of scalars being mapped.

This method has no functionality in this subclass of vtkScalarsToColors.

Reimplemented from vtkScalarsToColors.

Definition at line 552 of file vtkColorTransferFunction.h.

◆ SetRange() [2/2]

void vtkColorTransferFunction::SetRange ( const double  rng[2])
inlineoverrideprotectedvirtual

Sets/Gets the range of scalars that will be mapped.

Reimplemented from vtkScalarsToColors.

Definition at line 553 of file vtkColorTransferFunction.h.

◆ SortAndUpdateRange()

void vtkColorTransferFunction::SortAndUpdateRange ( )
protected

Internal method to sort the vector and update the Range whenever a node is added, edited or removed It always calls Modified().

◆ UpdateRange()

bool vtkColorTransferFunction::UpdateRange ( )
protected

Returns true if the range has been changed.

If the ranged has been modified, calls Modified().

◆ MovePoint()

void vtkColorTransferFunction::MovePoint ( double  oldX,
double  newX 
)
protected

Moves point from oldX to newX.

It removed the point from oldX. If any point existed at newX, it will also be removed.

◆ FindMinimumXDistance()

double vtkColorTransferFunction::FindMinimumXDistance ( )
protected

Traverses the nodes to find the minimum distance.

Assumes nodes are sorted.

Member Data Documentation

◆ Internal

vtkColorTransferFunctionInternals* vtkColorTransferFunction::Internal
protected

Definition at line 464 of file vtkColorTransferFunction.h.

◆ Clamping

vtkTypeBool vtkColorTransferFunction::Clamping
protected

Determines the function value outside of defined points Zero = always return 0.0 outside of defined points One = clamp to the lowest value below defined points and highest value above defined points.

Definition at line 472 of file vtkColorTransferFunction.h.

◆ ColorSpace

int vtkColorTransferFunction::ColorSpace
protected

The color space in which interpolation is performed.

Definition at line 477 of file vtkColorTransferFunction.h.

◆ HSVWrap

vtkTypeBool vtkColorTransferFunction::HSVWrap
protected

Specify if HSV is wrap or not.

Definition at line 482 of file vtkColorTransferFunction.h.

◆ Scale

int vtkColorTransferFunction::Scale
protected

The color interpolation scale (linear or logarithmic).

Definition at line 487 of file vtkColorTransferFunction.h.

◆ NanColor

double vtkColorTransferFunction::NanColor[3]
protected

The color to use for not-a-number.

Definition at line 492 of file vtkColorTransferFunction.h.

◆ NanOpacity

double vtkColorTransferFunction::NanOpacity
protected

The opacity to use for not-a-number.

Definition at line 497 of file vtkColorTransferFunction.h.

◆ BelowRangeColor

double vtkColorTransferFunction::BelowRangeColor[3]
protected

The below-range color.

Definition at line 502 of file vtkColorTransferFunction.h.

◆ UseBelowRangeColor

vtkTypeBool vtkColorTransferFunction::UseBelowRangeColor
protected

Flag indicating whether below-range color should be used.

Definition at line 507 of file vtkColorTransferFunction.h.

◆ AboveRangeColor

double vtkColorTransferFunction::AboveRangeColor[3]
protected

The above-range color.

Definition at line 512 of file vtkColorTransferFunction.h.

◆ UseAboveRangeColor

vtkTypeBool vtkColorTransferFunction::UseAboveRangeColor
protected

Flag indicating whether below-range color should be used.

Definition at line 517 of file vtkColorTransferFunction.h.

◆ Function

double* vtkColorTransferFunction::Function
protected

Temporary array to store data from the nodes.

Definition at line 522 of file vtkColorTransferFunction.h.

◆ Range

double vtkColorTransferFunction::Range[2]
protected

The min and max node locations.

Definition at line 527 of file vtkColorTransferFunction.h.

◆ UnsignedCharRGBAValue

unsigned char vtkColorTransferFunction::UnsignedCharRGBAValue[4]
protected

Temporary storage for an evaluated color (0 to 255 RGBA A=255)

Definition at line 532 of file vtkColorTransferFunction.h.

◆ AllowDuplicateScalars

vtkTypeBool vtkColorTransferFunction::AllowDuplicateScalars
protected

If on, the same scalar value may have more than one node assigned to it.

Definition at line 537 of file vtkColorTransferFunction.h.

◆ BuildTime

vtkTimeStamp vtkColorTransferFunction::BuildTime
protected

Definition at line 539 of file vtkColorTransferFunction.h.

◆ Table

unsigned char* vtkColorTransferFunction::Table
protected

Definition at line 540 of file vtkColorTransferFunction.h.

◆ TableSize

int vtkColorTransferFunction::TableSize
protected

Temporary storage for the size of the table.

Set in the method GetTable() and queried in GetNumberOfAvailableColors().

Definition at line 546 of file vtkColorTransferFunction.h.


The documentation for this class was generated from the following file: