VTK
|
a combination of vtkColorTransferFunction and vtkLookupTable. More...
#include <vtkDiscretizableColorTransferFunction.h>
Public Types | |
typedef vtkColorTransferFunction | Superclass |
Public Types inherited from vtkColorTransferFunction | |
typedef vtkScalarsToColors | Superclass |
Public Types inherited from vtkScalarsToColors | |
enum | VectorModes { MAGNITUDE =0, COMPONENT =1, RGBCOLORS =2 } |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkDiscretizableColorTransferFunction * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
Print method for vtkColorTransferFunction. More... | |
int | IsOpaque () |
Returns the negation of EnableOpacityMapping. More... | |
void | SetIndexedColor (unsigned int index, const double rgb[3]) |
Add colors to use when IndexedLookup is true. More... | |
void | SetIndexedColor (unsigned int index, double r, double g, double b) |
virtual void | GetIndexedColor (vtkIdType i, double rgba[4]) |
Get the "indexed color" assigned to an index. More... | |
virtual void | Build () |
Generate discretized lookup table, if applicable. More... | |
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 bytes). More... | |
virtual void | GetColor (double v, double rgb[3]) |
Map one value through the lookup table and return the color as an RGB array of doubles between 0 and 1. More... | |
virtual double | GetOpacity (double v) |
Return the opacity of a given scalar. More... | |
double * | GetRGBPoints () |
Returns the (x, r, g, b) values as an array. More... | |
virtual void | SetAlpha (double alpha) |
Specify an additional opacity (alpha) value to blend with. More... | |
virtual int | UsingLogScale () |
This should return 1 if the subclass is using log scale for mapping scalars to colors. More... | |
virtual vtkIdType | GetNumberOfAvailableColors () |
Get the number of available colors for mapping to. More... | |
virtual vtkMTimeType | GetMTime () |
Overridden to include the ScalarOpacityFunction's MTime. More... | |
void | SetNumberOfIndexedColors (unsigned int count) |
Set the number of indexed colors. More... | |
unsigned int | GetNumberOfIndexedColors () |
Set the number of indexed colors. More... | |
virtual void | SetDiscretize (int) |
Set if the values are to be mapped after discretization. More... | |
virtual int | GetDiscretize () |
Set if the values are to be mapped after discretization. More... | |
virtual void | DiscretizeOn () |
Set if the values are to be mapped after discretization. More... | |
virtual void | DiscretizeOff () |
Set if the values are to be mapped after discretization. More... | |
virtual void | SetUseLogScale (int useLogScale) |
Get/Set if log scale must be used while mapping scalars to colors. More... | |
virtual int | GetUseLogScale () |
Get/Set if log scale must be used while mapping scalars to colors. More... | |
virtual void | SetNumberOfValues (vtkIdType) |
Set the number of values i.e. More... | |
virtual vtkIdType | GetNumberOfValues () |
Set the number of values i.e. More... | |
virtual vtkUnsignedCharArray * | MapScalars (vtkDataArray *scalars, int colorMode, int component) |
Internal methods that map a data array into a 4-component, unsigned char RGBA array. More... | |
virtual vtkUnsignedCharArray * | MapScalars (vtkAbstractArray *scalars, int colorMode, int component) |
Internal methods that map a data array into a 4-component, unsigned char RGBA array. More... | |
virtual void | SetNanColor (double r, double g, double b) |
Set the color to use when a NaN (not a number) is encountered. More... | |
virtual void | SetNanColor (double rgb[3]) |
Set the color to use when a NaN (not a number) is encountered. More... | |
virtual void | SetScalarOpacityFunction (vtkPiecewiseFunction *function) |
Set/get the opacity function to use. More... | |
virtual vtkPiecewiseFunction * | GetScalarOpacityFunction () const |
Set/get the opacity function to use. More... | |
virtual void | SetEnableOpacityMapping (bool) |
Enable/disable the usage of the scalar opacity function. More... | |
virtual bool | GetEnableOpacityMapping () |
Enable/disable the usage of the scalar opacity function. More... | |
virtual void | EnableOpacityMappingOn () |
Enable/disable the usage of the scalar opacity function. More... | |
virtual void | EnableOpacityMappingOff () |
Enable/disable the usage of the scalar opacity function. More... | |
Public Member Functions inherited from vtkColorTransferFunction | |
vtkColorTransferFunction * | NewInstance () const |
void | DeepCopy (vtkScalarsToColors *f) |
Copy the contents from another object. More... | |
void | ShallowCopy (vtkColorTransferFunction *f) |
int | GetSize () |
How many nodes define this function? More... | |
void | RemoveAllPoints () |
Remove all points. More... | |
double * | GetColor (double x) |
Returns an RGB color for the specified scalar value. More... | |
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. More... | |
void | BuildFunctionFromTable (double x1, double x2, int size, double *table) |
Construct a color transfer function from a table. More... | |
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. More... | |
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. More... | |
virtual void | MapScalarsThroughTable2 (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement) |
Map a set of scalars through the lookup table. More... | |
int | EstimateMinNumberOfSamples (double const &x1, double const &x2) |
Estimates the minimum size of a table such that it would correctly sample this function. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
double | GetRedValue (double x) |
Get the color components individually. More... | |
double | GetGreenValue (double x) |
Get the color components individually. More... | |
double | GetBlueValue (double x) |
Get the color components individually. More... | |
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. More... | |
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. More... | |
virtual double * | GetRange () |
Returns min and max position of all function points. More... | |
virtual void | GetRange (double &, double &) |
Returns min and max position of all function points. More... | |
virtual void | GetRange (double[2]) |
Returns min and max position of all function points. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual void | SetClamping (int) |
Sets/gets whether clamping is used. More... | |
virtual int | GetClamping () |
Sets/gets whether clamping is used. More... | |
virtual void | ClampingOn () |
Sets/gets whether clamping is used. More... | |
virtual void | ClampingOff () |
Sets/gets whether clamping is used. More... | |
virtual void | SetColorSpace (int) |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
void | SetColorSpaceToRGB () |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
void | SetColorSpaceToHSV () |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
void | SetColorSpaceToLab () |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
void | SetColorSpaceToDiverging () |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
virtual int | GetColorSpace () |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
virtual void | SetHSVWrap (int) |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
virtual int | GetHSVWrap () |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
virtual void | HSVWrapOn () |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
virtual void | HSVWrapOff () |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. More... | |
virtual void | SetScale (int) |
Set the type of scale to use, linear or logarithmic. More... | |
void | SetScaleToLinear () |
Set the type of scale to use, linear or logarithmic. More... | |
void | SetScaleToLog10 () |
Set the type of scale to use, linear or logarithmic. More... | |
virtual int | GetScale () |
Set the type of scale to use, linear or logarithmic. More... | |
virtual double * | GetNanColor () |
Set the RGB color to use when a NaN (not a number) is encountered. More... | |
virtual void | GetNanColor (double &, double &, double &) |
Set the RGB color to use when a NaN (not a number) is encountered. More... | |
virtual void | GetNanColor (double[3]) |
Set the RGB color to use when a NaN (not a number) is encountered. More... | |
virtual void | SetBelowRangeColor (double, double, double) |
Set the color to use when a value below the range is encountered. More... | |
virtual void | SetBelowRangeColor (double[3]) |
Set the color to use when a value below the range is encountered. More... | |
virtual double * | GetBelowRangeColor () |
Set the color to use when a value below the range is encountered. More... | |
virtual void | GetBelowRangeColor (double &, double &, double &) |
Set the color to use when a value below the range is encountered. More... | |
virtual void | GetBelowRangeColor (double[3]) |
Set the color to use when a value below the range is encountered. More... | |
virtual void | SetUseBelowRangeColor (int) |
Set whether the below range color should be used. More... | |
virtual int | GetUseBelowRangeColor () |
Set whether the below range color should be used. More... | |
virtual void | UseBelowRangeColorOn () |
Set whether the below range color should be used. More... | |
virtual void | UseBelowRangeColorOff () |
Set whether the below range color should be used. More... | |
virtual void | SetAboveRangeColor (double, double, double) |
Set the color to use when a value above the range is encountered. More... | |
virtual void | SetAboveRangeColor (double[3]) |
Set the color to use when a value above the range is encountered. More... | |
virtual double * | GetAboveRangeColor () |
Set the color to use when a value above the range is encountered. More... | |
virtual void | GetAboveRangeColor (double &, double &, double &) |
Set the color to use when a value above the range is encountered. More... | |
virtual void | GetAboveRangeColor (double[3]) |
Set the color to use when a value above the range is encountered. More... | |
virtual void | SetUseAboveRangeColor (int) |
Set whether the below range color should be used. More... | |
virtual int | GetUseAboveRangeColor () |
Set whether the below range color should be used. More... | |
virtual void | UseAboveRangeColorOn () |
Set whether the below range color should be used. More... | |
virtual void | UseAboveRangeColorOff () |
Set whether the below range color should be used. More... | |
virtual void | SetAllowDuplicateScalars (int) |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default). More... | |
virtual int | GetAllowDuplicateScalars () |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default). More... | |
virtual void | AllowDuplicateScalarsOn () |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default). More... | |
virtual void | AllowDuplicateScalarsOff () |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default). More... | |
Public Member Functions inherited from vtkScalarsToColors | |
vtkScalarsToColors * | NewInstance () const |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output) |
void | MapScalarsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat) |
virtual vtkIdType | SetAnnotation (vtkVariant value, vtkStdString annotation) |
Add a new entry (or change an existing entry) to the list of annotated values. More... | |
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. More... | |
vtkIdType | GetNumberOfAnnotatedValues () |
Return the annotated value at a particular index in the list of annotations. More... | |
vtkVariant | GetAnnotatedValue (vtkIdType idx) |
Return the annotated value at a particular index in the list of annotations. More... | |
vtkStdString | GetAnnotation (vtkIdType idx) |
Return the annotation at a particular index in the list of annotations. More... | |
virtual void | GetAnnotationColor (const vtkVariant &val, double rgba[4]) |
Obtain the color associated with a particular annotated value (or NanColor if unmatched). More... | |
vtkIdType | GetAnnotatedValueIndex (vtkVariant val) |
Return the index of the given value in the list of annotated values (or -1 if not present). More... | |
vtkIdType | GetAnnotatedValueIndexInternal (vtkVariant &val) |
Look up an index into the array of annotations given a value. More... | |
virtual bool | RemoveAnnotation (vtkVariant value) |
Remove an existing entry from the list of annotated values. More... | |
virtual void | ResetAnnotations () |
Remove all existing values and their annotations. More... | |
void | SetRange (double rng[2]) |
Sets/Gets the range of scalars that will be mapped. More... | |
virtual double | GetAlpha () |
Specify an additional opacity (alpha) value to blend with. More... | |
virtual void | SetVectorMode (int) |
Change mode that maps vectors by magnitude vs. More... | |
virtual int | GetVectorMode () |
Change mode that maps vectors by magnitude vs. More... | |
void | SetVectorModeToMagnitude () |
Change mode that maps vectors by magnitude vs. More... | |
void | SetVectorModeToComponent () |
Change mode that maps vectors by magnitude vs. More... | |
void | SetVectorModeToRGBColors () |
Change mode that maps vectors by magnitude vs. More... | |
virtual void | SetVectorComponent (int) |
If the mapper does not select which component of a vector to map to colors, you can specify it here. More... | |
virtual int | GetVectorComponent () |
If the mapper does not select which component of a vector to map to colors, you can specify it here. More... | |
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. More... | |
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. More... | |
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). More... | |
virtual vtkAbstractArray * | GetAnnotatedValues () |
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). More... | |
virtual vtkStringArray * | GetAnnotations () |
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). More... | |
virtual void | SetIndexedLookup (int) |
Set/get whether the lookup table is for categorical or ordinal data. More... | |
virtual int | GetIndexedLookup () |
Set/get whether the lookup table is for categorical or ordinal data. More... | |
virtual void | IndexedLookupOn () |
Set/get whether the lookup table is for categorical or ordinal data. More... | |
virtual void | IndexedLookupOff () |
Set/get whether the lookup table is for categorical or ordinal data. More... | |
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. More... | |
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. More... | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. More... | |
virtual void | DebugOff () |
Turn debugging output off. More... | |
bool | GetDebug () |
Get the value of the debug flag. More... | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. More... | |
virtual void | Modified () |
Update the modification time for this object. More... | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | 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. More... | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
int | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
int | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
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. More... | |
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. More... | |
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. More... | |
int | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. More... | |
int | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. More... | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. More... | |
virtual void | Delete () |
Delete a VTK object. More... | |
virtual void | FastDelete () |
Delete a reference to this object. More... | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. More... | |
virtual void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). More... | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). More... | |
int | GetReferenceCount () |
Return the current reference count of this object. More... | |
void | SetReferenceCount (int) |
Sets the reference count. More... | |
void | PrintRevisions (ostream &) |
Legacy. More... | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
Static Public Member Functions | |
static vtkDiscretizableColorTransferFunction * | New () |
static int | IsTypeOf (const char *type) |
static vtkDiscretizableColorTransferFunction * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkColorTransferFunction | |
static vtkColorTransferFunction * | New () |
static int | IsTypeOf (const char *type) |
static vtkColorTransferFunction * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkScalarsToColors | |
static int | IsTypeOf (const char *type) |
static vtkScalarsToColors * | SafeDownCast (vtkObjectBase *o) |
static vtkScalarsToColors * | New () |
template<typename T > | |
static unsigned char | ColorToUChar (T t) |
Converts a color from numeric type T to uchar. More... | |
template<typename T > | |
static void | ColorToUChar (T t, unsigned char *dest) |
Converts a color from numeric type T to uchar. More... | |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. More... | |
static void | SetGlobalWarningDisplay (int val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static int | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
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. More... | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkDiscretizableColorTransferFunction () | |
~vtkDiscretizableColorTransferFunction () | |
void | MapDataArrayToOpacity (vtkDataArray *scalars, int component, vtkUnsignedCharArray *colors) |
Protected Member Functions inherited from vtkColorTransferFunction | |
vtkColorTransferFunction () | |
~vtkColorTransferFunction () | |
virtual void | SetRange (double, double) |
Set the range of scalars being mapped. More... | |
void | SetRange (double rng[2]) |
void | SortAndUpdateRange () |
Internal method to sort the vector and update the Range whenever a node is added, edited or removed It always calls Modified(). More... | |
bool | UpdateRange () |
Returns true if the range has been changed. More... | |
void | MovePoint (double oldX, double newX) |
Moves point from oldX to newX. More... | |
double | FindMinimumXDistance () |
Traverses the nodes to find the minimum distance. More... | |
Protected Member Functions inherited from vtkScalarsToColors | |
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. More... | |
vtkUnsignedCharArray * | ConvertToRGBA (vtkDataArray *colors, int numComp, int numTuples) |
An internal method used to convert a color array to RGBA. More... | |
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. More... | |
virtual vtkIdType | CheckForAnnotatedValue (vtkVariant value) |
Allocate annotation arrays if needed, then return the index of the given value or -1 if not present. More... | |
virtual void | UpdateAnnotatedValueMap () |
Update the map from annotated values to indices in the array of annotations. More... | |
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=NULL) |
These methods allow a command to exclusively grab all events. More... | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. More... | |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
int | Discretize |
Flag indicating whether transfer function is discretized. More... | |
int | UseLogScale |
Flag indicating whether log scaling is to be used. More... | |
vtkIdType | NumberOfValues |
Number of values to use in discretized color map. More... | |
vtkLookupTable * | LookupTable |
Internal lookup table used for some aspects of the color mapping. More... | |
vtkTimeStamp | BuildTime |
bool | EnableOpacityMapping |
vtkSmartPointer< vtkPiecewiseFunction > | ScalarOpacityFunction |
Protected Attributes inherited from vtkColorTransferFunction | |
vtkColorTransferFunctionInternals * | Internal |
int | 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. More... | |
int | ColorSpace |
The color space in which interpolation is performed. More... | |
int | HSVWrap |
Specify if HSV is wrap or not. More... | |
int | Scale |
The color interpolation scale (linear or logarithmic). More... | |
double | NanColor [3] |
The color to use for not-a-number. More... | |
double | BelowRangeColor [3] |
The below-range color. More... | |
int | UseBelowRangeColor |
Flag indicating whether below-range color should be used. More... | |
double | AboveRangeColor [3] |
The above-range color. More... | |
int | UseAboveRangeColor |
Flag indicating whether below-range color should be used. More... | |
double * | Function |
Temporary array to store data from the nodes. More... | |
double | Range [2] |
The min and max node locations. More... | |
unsigned char | UnsignedCharRGBAValue [4] |
Temporary storage for an evaluated color (0 to 255 RGBA A=255) More... | |
int | AllowDuplicateScalars |
If on, the same scalar value may have more than one node assigned to it. More... | |
vtkTimeStamp | BuildTime |
unsigned char * | Table |
int | TableSize |
Temporary storage for the size of the table. More... | |
Protected Attributes inherited from vtkScalarsToColors | |
vtkAbstractArray * | AnnotatedValues |
vtkStringArray * | Annotations |
vtkInternalAnnotatedValueMap * | AnnotatedValueMap |
int | 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 | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
a combination of vtkColorTransferFunction and vtkLookupTable.
This is a cross between a vtkColorTransferFunction and a vtkLookupTable selectively combining the functionality of both. This class is a vtkColorTransferFunction allowing users to specify the RGB control points that control the color transfer function. At the same time, by setting Discretize to 1 (true), one can force the transfer function to only have NumberOfValues discrete colors.
When IndexedLookup is true, this class behaves differently. The annotated values are considered to the be only valid values for which entries in the color table should be returned. The colors for annotated values are those specified using AddIndexedColors. Typically, there must be at least as many indexed colors specified as the annotations. For backwards compatibility, if no indexed-colors are specified, the colors in the lookup Table are assigned to annotated values by taking the modulus of their index in the list of annotations. If a scalar value is not present in AnnotatedValues, then NanColor will be used.
NOTE: One must call Build() after making any changes to the points in the ColorTransferFunction to ensure that the discrete and non-discrete versions match up.
Definition at line 56 of file vtkDiscretizableColorTransferFunction.h.
Definition at line 60 of file vtkDiscretizableColorTransferFunction.h.
|
protected |
|
protected |
|
static |
|
static |
|
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 vtkColorTransferFunction.
|
static |
|
protectedvirtual |
Reimplemented from vtkColorTransferFunction.
vtkDiscretizableColorTransferFunction* vtkDiscretizableColorTransferFunction::NewInstance | ( | ) | const |
|
virtual |
Print method for vtkColorTransferFunction.
Reimplemented from vtkColorTransferFunction.
|
virtual |
Returns the negation of EnableOpacityMapping.
Reimplemented from vtkScalarsToColors.
|
inline |
Add colors to use when IndexedLookup is true.
SetIndexedColor() will automatically call SetNumberOfIndexedColors(index+1) if the current number of indexed colors is not sufficient for the specified index and all will be initialized to the RGB values passed to this call.
Definition at line 75 of file vtkDiscretizableColorTransferFunction.h.
void vtkDiscretizableColorTransferFunction::SetIndexedColor | ( | unsigned int | index, |
double | r, | ||
double | g, | ||
double | b | ||
) |
|
virtual |
Get the "indexed color" assigned to an index.
The index is used in IndexedLookup mode to assign colors to annotations (in the order the annotations were set). Subclasses must implement this and interpret how to treat the index. vtkLookupTable simply returns GetTableValue(index % this->GetNumberOfTableValues()). vtkColorTransferFunction returns the color assocated with node index % this->GetSize().
Note that implementations must set the opacity (alpha) component of the color, even if they do not provide opacity values in their colormaps. In that case, alpha = 1 should be used.
Reimplemented from vtkColorTransferFunction.
void vtkDiscretizableColorTransferFunction::SetNumberOfIndexedColors | ( | unsigned int | count | ) |
Set the number of indexed colors.
These are used when IndexedLookup is true. If no indexed colors are specified, for backwards compatibility, this class reverts to using the RGBPoints for colors.
unsigned int vtkDiscretizableColorTransferFunction::GetNumberOfIndexedColors | ( | ) |
Set the number of indexed colors.
These are used when IndexedLookup is true. If no indexed colors are specified, for backwards compatibility, this class reverts to using the RGBPoints for colors.
|
virtual |
Generate discretized lookup table, if applicable.
This method must be called after changes to the ColorTransferFunction otherwise the discretized version will be inconsistent with the non-discretized one.
Reimplemented from vtkScalarsToColors.
|
virtual |
Set if the values are to be mapped after discretization.
The number of discrete values is set by using SetNumberOfValues(). Not set by default, i.e. color value is determined by interpolating at the scalar value.
|
virtual |
Set if the values are to be mapped after discretization.
The number of discrete values is set by using SetNumberOfValues(). Not set by default, i.e. color value is determined by interpolating at the scalar value.
|
virtual |
Set if the values are to be mapped after discretization.
The number of discrete values is set by using SetNumberOfValues(). Not set by default, i.e. color value is determined by interpolating at the scalar value.
|
virtual |
Set if the values are to be mapped after discretization.
The number of discrete values is set by using SetNumberOfValues(). Not set by default, i.e. color value is determined by interpolating at the scalar value.
|
virtual |
Get/Set if log scale must be used while mapping scalars to colors.
The default is 0.
|
virtual |
Get/Set if log scale must be used while mapping scalars to colors.
The default is 0.
|
virtual |
Set the number of values i.e.
colors to be generated in the discrete lookup table. This has no effect if Discretize is off. The default is 256.
|
virtual |
Set the number of values i.e.
colors to be generated in the discrete lookup table. This has no effect if Discretize is off. The default is 256.
|
virtual |
Map one value through the lookup table and return a color defined as a RGBA unsigned char tuple (4 bytes).
Reimplemented from vtkColorTransferFunction.
Map one value through the lookup table and return the color as an RGB array of doubles between 0 and 1.
Reimplemented from vtkColorTransferFunction.
Return the opacity of a given scalar.
Reimplemented from vtkScalarsToColors.
|
virtual |
Internal methods that map a data array into a 4-component, unsigned char RGBA array.
The color mode determines the behavior of mapping. If VTK_COLOR_MODE_DEFAULT is set, then unsigned char data arrays are treated as colors (and converted to RGBA if necessary); otherwise, the data is mapped through this instance of ScalarsToColors. The offset is used for data arrays with more than one component; it indicates which component to use to do the blending. When the component argument is -1, then the this object uses its own selected technique to change a vector into a scalar to map.
When IndexedLookup (inherited from vtkScalarsToColors) is true, the scalar opacity function is not used regardless of EnableOpacityMapping.
Reimplemented from vtkScalarsToColors.
|
virtual |
Internal methods that map a data array into a 4-component, unsigned char RGBA array.
The color mode determines the behavior of mapping. If VTK_COLOR_MODE_DEFAULT is set, then unsigned char data arrays are treated as colors (and converted to RGBA if necessary); otherwise, the data is mapped through this instance of ScalarsToColors. The offset is used for data arrays with more than one component; it indicates which component to use to do the blending. When the component argument is -1, then the this object uses its own selected technique to change a vector into a scalar to map.
When IndexedLookup (inherited from vtkScalarsToColors) is true, the scalar opacity function is not used regardless of EnableOpacityMapping.
Reimplemented from vtkScalarsToColors.
double* vtkDiscretizableColorTransferFunction::GetRGBPoints | ( | ) |
Returns the (x, r, g, b) values as an array.
vtkColorTransferFunction::GetDataPointer(). Retained for backwards compatibility.
|
virtual |
Specify an additional opacity (alpha) value to blend with.
Values != 1 modify the resulting color consistent with the requested form of the output. This is typically used by an actor in order to blend its opacity. Overridden to pass the alpha to the internal vtkLookupTable.
Reimplemented from vtkScalarsToColors.
|
virtual |
Set the 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]. Overridden to pass the NanColor to the internal vtkLookupTable.
Reimplemented from vtkColorTransferFunction.
|
inlinevirtual |
Set the 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]. Overridden to pass the NanColor to the internal vtkLookupTable.
Reimplemented from vtkColorTransferFunction.
Definition at line 205 of file vtkDiscretizableColorTransferFunction.h.
|
inlinevirtual |
This should return 1 if the subclass is using log scale for mapping scalars to colors.
Reimplemented from vtkScalarsToColors.
Definition at line 214 of file vtkDiscretizableColorTransferFunction.h.
|
virtual |
Get the number of available colors for mapping to.
Reimplemented from vtkColorTransferFunction.
|
virtual |
Set/get the opacity function to use.
|
virtual |
Set/get the opacity function to use.
|
virtual |
Enable/disable the usage of the scalar opacity function.
|
virtual |
Enable/disable the usage of the scalar opacity function.
|
virtual |
Enable/disable the usage of the scalar opacity function.
|
virtual |
Enable/disable the usage of the scalar opacity function.
|
virtual |
Overridden to include the ScalarOpacityFunction's MTime.
Reimplemented from vtkObject.
|
protected |
|
protected |
Flag indicating whether transfer function is discretized.
Definition at line 251 of file vtkDiscretizableColorTransferFunction.h.
|
protected |
Flag indicating whether log scaling is to be used.
Definition at line 256 of file vtkDiscretizableColorTransferFunction.h.
|
protected |
Number of values to use in discretized color map.
Definition at line 261 of file vtkDiscretizableColorTransferFunction.h.
|
protected |
Internal lookup table used for some aspects of the color mapping.
Definition at line 266 of file vtkDiscretizableColorTransferFunction.h.
|
protected |
Definition at line 268 of file vtkDiscretizableColorTransferFunction.h.
|
protected |
Definition at line 270 of file vtkDiscretizableColorTransferFunction.h.
|
protected |
Definition at line 271 of file vtkDiscretizableColorTransferFunction.h.