|
virtual int | IsA (const char *type) |
| Return 1 if this class is the same type of (or a subclass of) the named class. More...
|
|
vtkLookupTable * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
int | IsOpaque () override |
| Return true if all of the values defining the mapping have an opacity equal to 1. More...
|
|
int | Allocate (int sz=256, int ext=256) |
| Allocate a color table of specified size. More...
|
|
void | Build () override |
| Generate lookup table from hue, saturation, value, alpha min/max values. More...
|
|
virtual void | ForceBuild () |
| Force the lookup table to regenerate from hue, saturation, value, and alpha min/max values. More...
|
|
void | BuildSpecialColors () |
| Copies the "special" colors into the given table. More...
|
|
virtual void | SetRamp (int) |
| Set the shape of the table ramp to either linear or S-curve. More...
|
|
void | SetRampToLinear () |
|
void | SetRampToSCurve () |
|
void | SetRampToSQRT () |
|
virtual int | GetRamp () |
|
void | SetScale (int scale) |
| Set the type of scale to use, linear or logarithmic. More...
|
|
void | SetScaleToLinear () |
|
void | SetScaleToLog10 () |
|
virtual int | GetScale () |
|
void | SetTableRange (double r[2]) |
| Set/Get the minimum/maximum scalar values for scalar mapping. More...
|
|
virtual void | SetTableRange (double min, double max) |
|
virtual double * | GetTableRange () |
|
virtual void | GetTableRange (double data[2]) |
|
virtual void | SetHueRange (double, double) |
| Set the range in hue (using automatic generation). More...
|
|
void | SetHueRange (double[2]) |
|
virtual double * | GetHueRange () |
|
virtual void | GetHueRange (double &, double &) |
|
virtual void | GetHueRange (double[2]) |
|
virtual void | SetSaturationRange (double, double) |
| Set the range in saturation (using automatic generation). More...
|
|
void | SetSaturationRange (double[2]) |
|
virtual double * | GetSaturationRange () |
|
virtual void | GetSaturationRange (double &, double &) |
|
virtual void | GetSaturationRange (double[2]) |
|
virtual void | SetValueRange (double, double) |
| Set the range in value (using automatic generation). More...
|
|
void | SetValueRange (double[2]) |
|
virtual double * | GetValueRange () |
|
virtual void | GetValueRange (double &, double &) |
|
virtual void | GetValueRange (double[2]) |
|
virtual void | SetAlphaRange (double, double) |
| Set the range in alpha (using automatic generation). More...
|
|
void | SetAlphaRange (double[2]) |
|
virtual double * | GetAlphaRange () |
|
virtual void | GetAlphaRange (double &, double &) |
|
virtual void | GetAlphaRange (double[2]) |
|
virtual void | SetNanColor (double, double, double, double) |
| Set the color to use when a NaN (not a number) is encountered. More...
|
|
virtual void | SetNanColor (double[4]) |
|
virtual double * | GetNanColor () |
|
virtual void | GetNanColor (double &, double &, double &, double &) |
|
virtual void | GetNanColor (double[4]) |
|
unsigned char * | GetNanColorAsUnsignedChars () |
| Return the NanColor as a pointer to 4 unsigned chars. More...
|
|
virtual void | SetBelowRangeColor (double, double, double, double) |
| Set the color to use when a value below the range is encountered. More...
|
|
virtual void | SetBelowRangeColor (double[4]) |
|
virtual double * | GetBelowRangeColor () |
|
virtual void | GetBelowRangeColor (double &, double &, double &, double &) |
|
virtual void | GetBelowRangeColor (double[4]) |
|
virtual void | SetUseBelowRangeColor (int) |
| Set whether the below range color should be used. More...
|
|
virtual int | GetUseBelowRangeColor () |
|
virtual void | UseBelowRangeColorOn () |
|
virtual void | UseBelowRangeColorOff () |
|
virtual void | SetAboveRangeColor (double, double, double, double) |
| Set the color to use when a value above the range is encountered. More...
|
|
virtual void | SetAboveRangeColor (double[4]) |
|
virtual double * | GetAboveRangeColor () |
|
virtual void | GetAboveRangeColor (double &, double &, double &, double &) |
|
virtual void | GetAboveRangeColor (double[4]) |
|
virtual void | SetUseAboveRangeColor (int) |
| Set whether the below range color should be used. More...
|
|
virtual int | GetUseAboveRangeColor () |
|
virtual void | UseAboveRangeColorOn () |
|
virtual void | UseAboveRangeColorOff () |
|
unsigned char * | MapValue (double v) override |
| Map one value through the lookup table. More...
|
|
void | GetColor (double x, double rgb[3]) override |
| Map one value through the lookup table and return the color as an RGB array of doubles between 0 and 1. More...
|
|
double | GetOpacity (double v) override |
| Map one value through the lookup table and return the alpha value (the opacity) as a double between 0 and 1. More...
|
|
virtual vtkIdType | GetIndex (double v) |
| Return the table index associated with a particular value. More...
|
|
void | SetNumberOfTableValues (vtkIdType number) |
| Specify the number of values (i.e., colors) in the lookup table. More...
|
|
vtkIdType | GetNumberOfTableValues () |
|
virtual void | SetTableValue (vtkIdType indx, double rgba[4]) |
| Directly load color into lookup table. More...
|
|
virtual void | SetTableValue (vtkIdType indx, double r, double g, double b, double a=1.0) |
| Directly load color into lookup table. More...
|
|
double * | GetTableValue (vtkIdType id) |
| Return a rgba color value for the given index into the lookup table. More...
|
|
void | GetTableValue (vtkIdType id, double rgba[4]) |
| Return a rgba color value for the given index into the lookup table. More...
|
|
unsigned char * | GetPointer (const vtkIdType id) |
| Get pointer to color table data. More...
|
|
unsigned char * | WritePointer (const vtkIdType id, const int number) |
| Get pointer to data. More...
|
|
double * | GetRange () override |
| Sets/Gets the range of scalars which will be mapped. More...
|
|
void | SetRange (double min, double max) override |
|
void | SetRange (double rng[2]) |
|
virtual void | SetNumberOfColors (vtkIdType) |
| Set the number of colors in the lookup table. More...
|
|
virtual vtkIdType | GetNumberOfColors () |
|
void | SetTable (vtkUnsignedCharArray *) |
| Set/Get the internal table array that is used to map the scalars to colors. More...
|
|
virtual vtkUnsignedCharArray * | GetTable () |
|
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 More...
|
|
void | DeepCopy (vtkScalarsToColors *lut) override |
| Copy the contents from another LookupTable. More...
|
|
int | UsingLogScale () override |
| This should return 1 is the subclass is using log scale for mapping scalars to colors. More...
|
|
vtkIdType | GetNumberOfAvailableColors () override |
| Get the number of available colors for mapping to. More...
|
|
void | GetIndexedColor (vtkIdType idx, double rgba[4]) override |
| Return a color given an integer index. More...
|
|
virtual int | IsA (const char *type) |
| Return 1 if this class is the same type of (or a subclass of) the named class. More...
|
|
vtkScalarsToColors * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
virtual int | IsOpaque () |
| Return true if all of the values defining the mapping have an opacity equal to 1. More...
|
|
virtual void | Build () |
| Perform any processing required (if any) before processing scalars. More...
|
|
virtual double * | GetRange () |
| Sets/Gets the range of scalars that will be mapped. More...
|
|
virtual void | SetRange (double min, double max) |
|
void | SetRange (double rng[2]) |
|
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 store the color as an RGB array of doubles between 0 and 1 in the rgb argument. More...
|
|
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...
|
|
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. 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...
|
|
virtual void | SetAlpha (double alpha) |
| Specify an additional opacity (alpha) value to blend with. More...
|
|
virtual double | GetAlpha () |
|
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) |
|
virtual void | SetVectorMode (int) |
| Change mode that maps vectors by magnitude vs. More...
|
|
virtual int | GetVectorMode () |
|
void | SetVectorModeToMagnitude () |
|
void | SetVectorModeToComponent () |
|
void | SetVectorModeToRGBColors () |
|
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 () |
|
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 () |
|
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 void | MapScalarsThroughTable2 (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat) |
| An internal method typically not used in applications. More...
|
|
virtual void | DeepCopy (vtkScalarsToColors *o) |
| Copy the contents from another object. More...
|
|
virtual int | UsingLogScale () |
| This should return 1 is 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 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 () |
|
virtual vtkStringArray * | GetAnnotations () |
|
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 void | GetIndexedColor (vtkIdType i, double rgba[4]) |
| Get the "indexed color" assigned to an index. 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...
|
|
virtual void | SetIndexedLookup (int) |
| Set/get whether the lookup table is for categorical or ordinal data. More...
|
|
virtual int | GetIndexedLookup () |
|
virtual void | IndexedLookupOn () |
|
virtual void | IndexedLookupOff () |
|
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) |
|
| 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...
|
|
virtual vtkMTimeType | GetMTime () |
| Return this object's modified time. More...
|
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
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) |
|
vtkCommand * | GetCommand (unsigned long tag) |
|
void | RemoveObserver (vtkCommand *) |
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
|
void | RemoveObservers (const char *event, vtkCommand *) |
|
int | HasObserver (unsigned long event, vtkCommand *) |
|
int | HasObserver (const char *event, vtkCommand *) |
|
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) |
|
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) |
|
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) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
const char * | GetClassName () const |
| Return the class name as a string. More...
|
|
virtual vtkTypeBool | IsA (const char *name) |
| Return 1 if this class is the same type of (or a subclass of) the named class. 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 | PrintSelf (ostream &os, vtkIndent indent) |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
|
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...
|
|
map scalar values into colors via a lookup table
vtkLookupTable is an object that is used by mapper objects to map scalar values into RGBA (red-green-blue-alpha transparency) color specification, or RGBA into scalar values. The color table can be created by direct insertion of color values, or by specifying a hue, saturation, value, and alpha range and generating a table.
A special color for NaN values in the data can be specified via SetNanColor(). In addition, a color for data values below the lookup table range minimum can be specified with SetBelowRangeColor(), and that color will be used for values below the range minimum when UseBelowRangeColor is on. Likewise, a color for data values above the lookup table range maximum can be specified with SetAboveRangeColor(), and it is used when UseAboveRangeColor is on.
This class behaves differently depending on how IndexedLookup is set. When true, vtkLookupTable enters a mode for representing categorical color maps. By setting IndexedLookup to true, you indicate that the annotated values are the only valid values for which entries in the color table should be returned. The colors in the lookup Table are assigned to annotated values by taking the modulus of their index in the list of annotations. IndexedLookup changes the behavior of GetIndex, which in turn changes the way MapScalarsThroughTable2 behaves; when IndexedLookup is true, MapScalarsThroughTable2 will search for scalar values in AnnotatedValues and use the resulting index to determine the color. If a scalar value is not present in AnnotatedValues, then NanColor will be used.
- Warning
- You need to explicitly call Build() when constructing the LUT by hand.
- See also
- vtkLogLookupTable vtkWindowLevelLookupTable
- Examples:
- vtkLookupTable (Examples)
- Tests:
- vtkLookupTable (Tests)
Definition at line 74 of file vtkLookupTable.h.