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

map scalar values into colors via a lookup table More...

#include <vtkLookupTable.h>

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

Public Types

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

Public Member Functions

virtual int IsA (const char *type)
 
vtkLookupTableNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual int IsOpaque ()
 
int Allocate (int sz=256, int ext=256)
 
virtual void Build ()
 
virtual void ForceBuild ()
 
unsigned char * GetNanColorAsUnsignedChars ()
 
unsigned char * MapValue (double v)
 
void GetColor (double x, double rgb[3])
 
double GetOpacity (double v)
 
virtual vtkIdType GetIndex (double v)
 
virtual void SetTableValue (vtkIdType indx, double rgba[4])
 
doubleGetTableValue (vtkIdType id)
 
void GetTableValue (vtkIdType id, double rgba[4])
 
unsigned char * WritePointer (const vtkIdType id, const int number)
 
void DeepCopy (vtkScalarsToColors *lut)
 
virtual vtkIdType GetNumberOfAvailableColors ()
 
virtual void GetIndexedColor (vtkIdType idx, double rgba[4])
 
virtual void SetRamp (int)
 
void SetRampToLinear ()
 
void SetRampToSCurve ()
 
void SetRampToSQRT ()
 
virtual int GetRamp ()
 
void SetScale (int scale)
 
void SetScaleToLinear ()
 
void SetScaleToLog10 ()
 
virtual int GetScale ()
 
void SetTableRange (double r[2])
 
virtual void SetTableRange (double min, double max)
 
virtual doubleGetTableRange ()
 
virtual void GetTableRange (double data[2])
 
virtual void SetHueRange (double, double)
 
void SetHueRange (double[2])
 
virtual doubleGetHueRange ()
 
virtual void GetHueRange (double &, double &)
 
virtual void GetHueRange (double[2])
 
virtual void SetSaturationRange (double, double)
 
void SetSaturationRange (double[2])
 
virtual doubleGetSaturationRange ()
 
virtual void GetSaturationRange (double &, double &)
 
virtual void GetSaturationRange (double[2])
 
virtual void SetValueRange (double, double)
 
void SetValueRange (double[2])
 
virtual doubleGetValueRange ()
 
virtual void GetValueRange (double &, double &)
 
virtual void GetValueRange (double[2])
 
virtual void SetAlphaRange (double, double)
 
void SetAlphaRange (double[2])
 
virtual doubleGetAlphaRange ()
 
virtual void GetAlphaRange (double &, double &)
 
virtual void GetAlphaRange (double[2])
 
virtual void SetNanColor (double, double, double, double)
 
virtual void SetNanColor (double[4])
 
virtual doubleGetNanColor ()
 
virtual void GetNanColor (double &, double &, double &, double &)
 
virtual void GetNanColor (double[4])
 
virtual void SetBelowRangeColor (double, double, double, double)
 
virtual void SetBelowRangeColor (double[4])
 
virtual doubleGetBelowRangeColor ()
 
virtual void GetBelowRangeColor (double &, double &, double &, double &)
 
virtual void GetBelowRangeColor (double[4])
 
virtual void SetUseBelowRangeColor (int)
 
virtual int GetUseBelowRangeColor ()
 
virtual void UseBelowRangeColorOn ()
 
virtual void UseBelowRangeColorOff ()
 
virtual void SetAboveRangeColor (double, double, double, double)
 
virtual void SetAboveRangeColor (double[4])
 
virtual doubleGetAboveRangeColor ()
 
virtual void GetAboveRangeColor (double &, double &, double &, double &)
 
virtual void GetAboveRangeColor (double[4])
 
virtual void SetUseAboveRangeColor (int)
 
virtual int GetUseAboveRangeColor ()
 
virtual void UseAboveRangeColorOn ()
 
virtual void UseAboveRangeColorOff ()
 
void SetNumberOfTableValues (vtkIdType number)
 
vtkIdType GetNumberOfTableValues ()
 
virtual void SetTableValue (vtkIdType indx, double r, double g, double b, double a=1.0)
 
unsigned char * GetPointer (const vtkIdType id)
 
doubleGetRange ()
 
void SetRange (double min, double max)
 
void SetRange (double rng[2])
 
virtual void SetNumberOfColors (vtkIdType)
 
virtual vtkIdType GetNumberOfColors ()
 
void SetTable (vtkUnsignedCharArray *)
 
virtual vtkUnsignedCharArrayGetTable ()
 
void MapScalarsThroughTable2 (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement)
 
virtual int UsingLogScale ()
 
- Public Member Functions inherited from vtkScalarsToColors
vtkScalarsToColorsNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual vtkIdType SetAnnotation (vtkVariant value, vtkStdString annotation)
 
virtual vtkIdType SetAnnotation (vtkStdString value, vtkStdString annotation)
 
vtkIdType GetNumberOfAnnotatedValues ()
 
vtkVariant GetAnnotatedValue (vtkIdType idx)
 
vtkStdString GetAnnotation (vtkIdType idx)
 
virtual void GetAnnotationColor (const vtkVariant &val, double rgba[4])
 
vtkIdType GetAnnotatedValueIndex (vtkVariant val)
 
vtkIdType GetAnnotatedValueIndexInternal (vtkVariant &val)
 
virtual bool RemoveAnnotation (vtkVariant value)
 
virtual void ResetAnnotations ()
 
void SetRange (double rng[2])
 
doubleGetColor (double v)
 
double GetLuminance (double x)
 
virtual void SetAlpha (double alpha)
 
virtual double GetAlpha ()
 
virtual vtkUnsignedCharArrayMapScalars (vtkDataArray *scalars, int colorMode, int component)
 
virtual vtkUnsignedCharArrayMapScalars (vtkAbstractArray *scalars, int colorMode, int component)
 
virtual void SetVectorMode (int)
 
virtual int GetVectorMode ()
 
void SetVectorModeToMagnitude ()
 
void SetVectorModeToComponent ()
 
void SetVectorModeToRGBColors ()
 
virtual void SetVectorComponent (int)
 
virtual int GetVectorComponent ()
 
virtual void SetVectorSize (int)
 
virtual int GetVectorSize ()
 
void MapVectorsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat, int vectorComponent, int vectorSize)
 
void MapVectorsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
 
void MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output, int outputFormat)
 
void MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output)
 
void MapScalarsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
 
virtual void SetAnnotations (vtkAbstractArray *values, vtkStringArray *annotations)
 
virtual vtkAbstractArrayGetAnnotatedValues ()
 
virtual vtkStringArrayGetAnnotations ()
 
virtual void SetIndexedLookup (int)
 
virtual int GetIndexedLookup ()
 
virtual void IndexedLookupOn ()
 
virtual void IndexedLookupOff ()
 
template<>
unsigned char ColorToUChar (double t)
 
template<>
unsigned char ColorToUChar (float t)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (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)
 
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)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkLookupTableNew ()
 
static int IsTypeOf (const char *type)
 
static vtkLookupTableSafeDownCast (vtkObjectBase *o)
 
static void GetLogRange (const double range[2], double log_range[2])
 
static void GetColorAsUnsignedChars (const double colorIn[4], unsigned char colorOut[4])
 
static double ApplyLogScale (double v, const double range[2], const double log_range[2])
 
- Static Public Member Functions inherited from vtkScalarsToColors
static int IsTypeOf (const char *type)
 
static vtkScalarsToColorsSafeDownCast (vtkObjectBase *o)
 
static vtkScalarsToColorsNew ()
 
template<typename T >
static unsigned char ColorToUChar (T t)
 
template<typename T >
static void ColorToUChar (T t, unsigned char *dest)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Static Public Attributes

static const vtkIdType BELOW_RANGE_COLOR_INDEX
 
static const vtkIdType ABOVE_RANGE_COLOR_INDEX
 
static const vtkIdType NAN_COLOR_INDEX
 
static const vtkIdType NUMBER_OF_SPECIAL_COLORS
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkLookupTable (int sze=256, int ext=256)
 
 ~vtkLookupTable ()
 
void ResizeTableForSpecialColors ()
 
- Protected Member Functions inherited from vtkScalarsToColors
 vtkScalarsToColors ()
 
 ~vtkScalarsToColors ()
 
virtual vtkIdType CheckForAnnotatedValue (vtkVariant value)
 
virtual void UpdateAnnotatedValueMap ()
 
void MapColorsToColors (void *input, unsigned char *output, int inputDataType, int numberOfValues, int numberOfComponents, int vectorSize, int outputFormat)
 
vtkUnsignedCharArrayConvertToRGBA (vtkDataArray *colors, int numComp, int numTuples)
 
void MapVectorsToMagnitude (void *input, double *output, int inputDataType, int numberOfValues, int numberOfComponents, int vectorSize)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- 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

vtkIdType NumberOfColors
 
vtkUnsignedCharArrayTable
 
double TableRange [2]
 
double HueRange [2]
 
double SaturationRange [2]
 
double ValueRange [2]
 
double AlphaRange [2]
 
double NanColor [4]
 
double BelowRangeColor [4]
 
int UseBelowRangeColor
 
double AboveRangeColor [4]
 
int UseAboveRangeColor
 
int Scale
 
int Ramp
 
vtkTimeStamp InsertTime
 
vtkTimeStamp BuildTime
 
double RGBA [4]
 
unsigned char NanColorChar [4]
 
int OpaqueFlag
 
vtkTimeStamp OpaqueFlagBuildTime
 
- Protected Attributes inherited from vtkScalarsToColors
vtkAbstractArrayAnnotatedValues
 
vtkStringArrayAnnotations
 
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
 

Detailed Description

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 73 of file vtkLookupTable.h.

Member Typedef Documentation

Definition at line 90 of file vtkLookupTable.h.

Constructor & Destructor Documentation

vtkLookupTable::vtkLookupTable ( int  sze = 256,
int  ext = 256 
)
protected
vtkLookupTable::~vtkLookupTable ( )
protected

Member Function Documentation

static vtkLookupTable* vtkLookupTable::New ( )
static

Construct with range=[0,1]; and hsv ranges set up for rainbow color table (from red to blue).

static int vtkLookupTable::IsTypeOf ( const char *  type)
static
virtual int vtkLookupTable::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 vtkLookupTableWithEnabling, vtkWindowLevelLookupTable, and vtkLogLookupTable.

static vtkLookupTable* vtkLookupTable::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkLookupTable::NewInstanceInternal ( ) const
protectedvirtual
vtkLookupTable* vtkLookupTable::NewInstance ( ) const
void vtkLookupTable::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

Reimplemented in vtkLookupTableWithEnabling, vtkWindowLevelLookupTable, and vtkLogLookupTable.

virtual int vtkLookupTable::IsOpaque ( )
virtual

Return true if all of the values defining the mapping have an opacity equal to 1.

Reimplemented from vtkScalarsToColors.

int vtkLookupTable::Allocate ( int  sz = 256,
int  ext = 256 
)

Allocate a color table of specified size.

virtual void vtkLookupTable::Build ( )
virtual

Generate lookup table from hue, saturation, value, alpha min/max values. Table is built from linear ramp of each value.

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkWindowLevelLookupTable.

virtual void vtkLookupTable::ForceBuild ( )
virtual

Force the lookup table to regenerate from hue, saturation, value, and alpha min/max values. Table is built from a linear ramp of each value. ForceBuild() is useful if a lookup table has been defined manually (using SetTableValue) and then an application decides to rebuild the lookup table using the implicit process.

virtual void vtkLookupTable::SetRamp ( int  )
virtual

Set the shape of the table ramp to either linear or S-curve. The default is S-curve, which tails off gradually at either end. The equation used for the S-curve is y = (sin((x - 1/2)*pi) + 1)/2, while the equation for the linear ramp is simply y = x. For an S-curve greyscale ramp, you should set NumberOfTableValues to 402 (which is 256*pi/2) to provide room for the tails of the ramp. The equation for the SQRT is y = sqrt(x).

void vtkLookupTable::SetRampToLinear ( )
inline

Set the shape of the table ramp to either linear or S-curve. The default is S-curve, which tails off gradually at either end. The equation used for the S-curve is y = (sin((x - 1/2)*pi) + 1)/2, while the equation for the linear ramp is simply y = x. For an S-curve greyscale ramp, you should set NumberOfTableValues to 402 (which is 256*pi/2) to provide room for the tails of the ramp. The equation for the SQRT is y = sqrt(x).

Definition at line 120 of file vtkLookupTable.h.

void vtkLookupTable::SetRampToSCurve ( )
inline

Set the shape of the table ramp to either linear or S-curve. The default is S-curve, which tails off gradually at either end. The equation used for the S-curve is y = (sin((x - 1/2)*pi) + 1)/2, while the equation for the linear ramp is simply y = x. For an S-curve greyscale ramp, you should set NumberOfTableValues to 402 (which is 256*pi/2) to provide room for the tails of the ramp. The equation for the SQRT is y = sqrt(x).

Definition at line 121 of file vtkLookupTable.h.

void vtkLookupTable::SetRampToSQRT ( )
inline

Set the shape of the table ramp to either linear or S-curve. The default is S-curve, which tails off gradually at either end. The equation used for the S-curve is y = (sin((x - 1/2)*pi) + 1)/2, while the equation for the linear ramp is simply y = x. For an S-curve greyscale ramp, you should set NumberOfTableValues to 402 (which is 256*pi/2) to provide room for the tails of the ramp. The equation for the SQRT is y = sqrt(x).

Definition at line 122 of file vtkLookupTable.h.

virtual int vtkLookupTable::GetRamp ( )
virtual

Set the shape of the table ramp to either linear or S-curve. The default is S-curve, which tails off gradually at either end. The equation used for the S-curve is y = (sin((x - 1/2)*pi) + 1)/2, while the equation for the linear ramp is simply y = x. For an S-curve greyscale ramp, you should set NumberOfTableValues to 402 (which is 256*pi/2) to provide room for the tails of the ramp. The equation for the SQRT is y = sqrt(x).

void vtkLookupTable::SetScale ( int  scale)

Set the type of scale to use, linear or logarithmic. The default is linear. If the scale is logarithmic, then the TableRange must not cross the value zero.

void vtkLookupTable::SetScaleToLinear ( )
inline

Set the type of scale to use, linear or logarithmic. The default is linear. If the scale is logarithmic, then the TableRange must not cross the value zero.

Definition at line 131 of file vtkLookupTable.h.

void vtkLookupTable::SetScaleToLog10 ( )
inline

Set the type of scale to use, linear or logarithmic. The default is linear. If the scale is logarithmic, then the TableRange must not cross the value zero.

Definition at line 132 of file vtkLookupTable.h.

virtual int vtkLookupTable::GetScale ( )
virtual

Set the type of scale to use, linear or logarithmic. The default is linear. If the scale is logarithmic, then the TableRange must not cross the value zero.

void vtkLookupTable::SetTableRange ( double  r[2])

Set/Get the minimum/maximum scalar values for scalar mapping. Scalar values less than minimum range value are clamped to minimum range value. Scalar values greater than maximum range value are clamped to maximum range value. The TableRange values are only used when IndexedLookup is false.

virtual void vtkLookupTable::SetTableRange ( double  min,
double  max 
)
virtual

Set/Get the minimum/maximum scalar values for scalar mapping. Scalar values less than minimum range value are clamped to minimum range value. Scalar values greater than maximum range value are clamped to maximum range value. The TableRange values are only used when IndexedLookup is false.

virtual double* vtkLookupTable::GetTableRange ( )
virtual

Set/Get the minimum/maximum scalar values for scalar mapping. Scalar values less than minimum range value are clamped to minimum range value. Scalar values greater than maximum range value are clamped to maximum range value. The TableRange values are only used when IndexedLookup is false.

virtual void vtkLookupTable::GetTableRange ( double  data[2])
virtual

Set/Get the minimum/maximum scalar values for scalar mapping. Scalar values less than minimum range value are clamped to minimum range value. Scalar values greater than maximum range value are clamped to maximum range value. The TableRange values are only used when IndexedLookup is false.

virtual void vtkLookupTable::SetHueRange ( double  ,
double   
)
virtual

Set the range in hue (using automatic generation). Hue ranges between [0,1].

void vtkLookupTable::SetHueRange ( double  [2])

Set the range in hue (using automatic generation). Hue ranges between [0,1].

virtual double* vtkLookupTable::GetHueRange ( )
virtual

Set the range in hue (using automatic generation). Hue ranges between [0,1].

virtual void vtkLookupTable::GetHueRange ( double ,
double  
)
virtual

Set the range in hue (using automatic generation). Hue ranges between [0,1].

virtual void vtkLookupTable::GetHueRange ( double  [2])
virtual

Set the range in hue (using automatic generation). Hue ranges between [0,1].

virtual void vtkLookupTable::SetSaturationRange ( double  ,
double   
)
virtual

Set the range in saturation (using automatic generation). Saturation ranges between [0,1].

void vtkLookupTable::SetSaturationRange ( double  [2])

Set the range in saturation (using automatic generation). Saturation ranges between [0,1].

virtual double* vtkLookupTable::GetSaturationRange ( )
virtual

Set the range in saturation (using automatic generation). Saturation ranges between [0,1].

virtual void vtkLookupTable::GetSaturationRange ( double ,
double  
)
virtual

Set the range in saturation (using automatic generation). Saturation ranges between [0,1].

virtual void vtkLookupTable::GetSaturationRange ( double  [2])
virtual

Set the range in saturation (using automatic generation). Saturation ranges between [0,1].

virtual void vtkLookupTable::SetValueRange ( double  ,
double   
)
virtual

Set the range in value (using automatic generation). Value ranges between [0,1].

void vtkLookupTable::SetValueRange ( double  [2])

Set the range in value (using automatic generation). Value ranges between [0,1].

virtual double* vtkLookupTable::GetValueRange ( )
virtual

Set the range in value (using automatic generation). Value ranges between [0,1].

virtual void vtkLookupTable::GetValueRange ( double ,
double  
)
virtual

Set the range in value (using automatic generation). Value ranges between [0,1].

virtual void vtkLookupTable::GetValueRange ( double  [2])
virtual

Set the range in value (using automatic generation). Value ranges between [0,1].

virtual void vtkLookupTable::SetAlphaRange ( double  ,
double   
)
virtual

Set the range in alpha (using automatic generation). Alpha ranges from [0,1].

void vtkLookupTable::SetAlphaRange ( double  [2])

Set the range in alpha (using automatic generation). Alpha ranges from [0,1].

virtual double* vtkLookupTable::GetAlphaRange ( )
virtual

Set the range in alpha (using automatic generation). Alpha ranges from [0,1].

virtual void vtkLookupTable::GetAlphaRange ( double ,
double  
)
virtual

Set the range in alpha (using automatic generation). Alpha ranges from [0,1].

virtual void vtkLookupTable::GetAlphaRange ( double  [2])
virtual

Set the range in alpha (using automatic generation). Alpha ranges from [0,1].

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

Set the color to use when a NaN (not a number) is encountered. This is an RGBA 4-tuple of doubles in the range [0,1].

virtual void vtkLookupTable::SetNanColor ( double  [4])
virtual

Set the color to use when a NaN (not a number) is encountered. This is an RGBA 4-tuple of doubles in the range [0,1].

virtual double* vtkLookupTable::GetNanColor ( )
virtual

Set the color to use when a NaN (not a number) is encountered. This is an RGBA 4-tuple of doubles in the range [0,1].

virtual void vtkLookupTable::GetNanColor ( double ,
double ,
double ,
double  
)
virtual

Set the color to use when a NaN (not a number) is encountered. This is an RGBA 4-tuple of doubles in the range [0,1].

virtual void vtkLookupTable::GetNanColor ( double  [4])
virtual

Set the color to use when a NaN (not a number) is encountered. This is an RGBA 4-tuple of doubles in the range [0,1].

unsigned char* vtkLookupTable::GetNanColorAsUnsignedChars ( )

Return the NanColor as a pointer to 4 unsigned chars. This will overwrite any data returned by previous calls to MapValue.

static void vtkLookupTable::GetColorAsUnsignedChars ( const double  colorIn[4],
unsigned char  colorOut[4] 
)
static

Cast a double color in a type T color. colorIn and colorOut are expected to be RGBA[4] and colorIn to be in [0.0, 1.0]

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

Set the color to use when a value below the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual void vtkLookupTable::SetBelowRangeColor ( double  [4])
virtual

Set the color to use when a value below the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual double* vtkLookupTable::GetBelowRangeColor ( )
virtual

Set the color to use when a value below the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual void vtkLookupTable::GetBelowRangeColor ( double ,
double ,
double ,
double  
)
virtual

Set the color to use when a value below the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual void vtkLookupTable::GetBelowRangeColor ( double  [4])
virtual

Set the color to use when a value below the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual void vtkLookupTable::SetUseBelowRangeColor ( int  )
virtual

Set whether the below range color should be used.

virtual int vtkLookupTable::GetUseBelowRangeColor ( )
virtual

Set whether the below range color should be used.

virtual void vtkLookupTable::UseBelowRangeColorOn ( )
virtual

Set whether the below range color should be used.

virtual void vtkLookupTable::UseBelowRangeColorOff ( )
virtual

Set whether the below range color should be used.

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

Set the color to use when a value above the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual void vtkLookupTable::SetAboveRangeColor ( double  [4])
virtual

Set the color to use when a value above the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual double* vtkLookupTable::GetAboveRangeColor ( )
virtual

Set the color to use when a value above the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual void vtkLookupTable::GetAboveRangeColor ( double ,
double ,
double ,
double  
)
virtual

Set the color to use when a value above the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual void vtkLookupTable::GetAboveRangeColor ( double  [4])
virtual

Set the color to use when a value above the range is encountered. This is an RGBA 4-tuple of doubles in the range [0, 1].

virtual void vtkLookupTable::SetUseAboveRangeColor ( int  )
virtual

Set whether the below range color should be used.

virtual int vtkLookupTable::GetUseAboveRangeColor ( )
virtual

Set whether the below range color should be used.

virtual void vtkLookupTable::UseAboveRangeColorOn ( )
virtual

Set whether the below range color should be used.

virtual void vtkLookupTable::UseAboveRangeColorOff ( )
virtual

Set whether the below range color should be used.

unsigned char* vtkLookupTable::MapValue ( double  v)
virtual

Map one value through the lookup table.

Reimplemented from vtkScalarsToColors.

void vtkLookupTable::GetColor ( double  x,
double  rgb[3] 
)
virtual

Map one value through the lookup table and return the color as an RGB array of doubles between 0 and 1.

Reimplemented from vtkScalarsToColors.

double vtkLookupTable::GetOpacity ( double  v)
virtual

Map one value through the lookup table and return the alpha value (the opacity) as a double between 0 and 1.

Reimplemented from vtkScalarsToColors.

virtual vtkIdType vtkLookupTable::GetIndex ( double  v)
virtual

Return the table index associated with a particular value. Do not use this function when IndexedLookup is true: in that case, the set of values v may take on is exactly the integers from 0 to GetNumberOfTableValues() - 1; and v serves directly as an index into TableValues.

void vtkLookupTable::SetNumberOfTableValues ( vtkIdType  number)

Specify the number of values (i.e., colors) in the lookup table.

vtkIdType vtkLookupTable::GetNumberOfTableValues ( )
inline

Specify the number of values (i.e., colors) in the lookup table.

Definition at line 242 of file vtkLookupTable.h.

virtual void vtkLookupTable::SetTableValue ( vtkIdType  indx,
double  rgba[4] 
)
virtual

Directly load color into lookup table. Use [0,1] double values for color component specification. Make sure that you've either used the Build() method or used SetNumberOfTableValues() prior to using this method.

virtual void vtkLookupTable::SetTableValue ( vtkIdType  indx,
double  r,
double  g,
double  b,
double  a = 1.0 
)
virtual

Directly load color into lookup table. Use [0,1] double values for color component specification.

double* vtkLookupTable::GetTableValue ( vtkIdType  id)

Return a rgba color value for the given index into the lookup table. Color components are expressed as [0,1] double values.

void vtkLookupTable::GetTableValue ( vtkIdType  id,
double  rgba[4] 
)

Return a rgba color value for the given index into the lookup table. Color components are expressed as [0,1] double values.

unsigned char* vtkLookupTable::GetPointer ( const vtkIdType  id)
inline

Get pointer to color table data. Format is array of unsigned char r-g-b-a-r-g-b-a...

Definition at line 269 of file vtkLookupTable.h.

unsigned char * vtkLookupTable::WritePointer ( const vtkIdType  id,
const int  number 
)
inline

Get pointer to data. Useful for direct writes into object. MaxId is bumped by number (and memory allocated if necessary). Id is the location you wish to write into; number is the number of rgba values to write.

Definition at line 382 of file vtkLookupTable.h.

double* vtkLookupTable::GetRange ( )
inlinevirtual

Sets/Gets the range of scalars which will be mapped. This is a duplicate of Get/SetTableRange.

Reimplemented from vtkScalarsToColors.

Definition at line 282 of file vtkLookupTable.h.

void vtkLookupTable::SetRange ( double  min,
double  max 
)
inlinevirtual

Sets/Gets the range of scalars which will be mapped. This is a duplicate of Get/SetTableRange.

Reimplemented from vtkScalarsToColors.

Definition at line 283 of file vtkLookupTable.h.

void vtkLookupTable::SetRange ( double  rng[2])
inline

Sets/Gets the range of scalars which will be mapped. This is a duplicate of Get/SetTableRange.

Definition at line 284 of file vtkLookupTable.h.

static void vtkLookupTable::GetLogRange ( const double  range[2],
double  log_range[2] 
)
static

Returns the log of range in log_range. There is a little more to this than simply taking the log10 of the two range values: we do conversion of negative ranges to positive ranges, and conversion of zero to a 'very small number'.

static double vtkLookupTable::ApplyLogScale ( double  v,
const double  range[2],
const double  log_range[2] 
)
static

Apply log to value, with appropriate constraints.

virtual void vtkLookupTable::SetNumberOfColors ( vtkIdType  )
virtual

Set the number of colors in the lookup table. Use SetNumberOfTableValues() instead, it can be used both before and after the table has been built whereas SetNumberOfColors() has no effect after the table has been built.

virtual vtkIdType vtkLookupTable::GetNumberOfColors ( )
virtual

Set the number of colors in the lookup table. Use SetNumberOfTableValues() instead, it can be used both before and after the table has been built whereas SetNumberOfColors() has no effect after the table has been built.

void vtkLookupTable::SetTable ( vtkUnsignedCharArray )

Set/Get the internal table array that is used to map the scalars to colors. The table array is an unsigned char array with 4 components representing RGBA.

virtual vtkUnsignedCharArray* vtkLookupTable::GetTable ( )
virtual

Set/Get the internal table array that is used to map the scalars to colors. The table array is an unsigned char array with 4 components representing RGBA.

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

map a set of scalars through the lookup table

Reimplemented from vtkScalarsToColors.

Reimplemented in vtkLookupTableWithEnabling.

void vtkLookupTable::DeepCopy ( vtkScalarsToColors lut)
virtual

Copy the contents from another LookupTable

Reimplemented from vtkScalarsToColors.

virtual int vtkLookupTable::UsingLogScale ( )
inlinevirtual

This should return 1 is the subclass is using log scale for mapping scalars to colors. Returns 1 is scale == VTK_SCALE_LOG10.

Reimplemented from vtkScalarsToColors.

Definition at line 331 of file vtkLookupTable.h.

virtual vtkIdType vtkLookupTable::GetNumberOfAvailableColors ( )
virtual

Get the number of available colors for mapping to.

Reimplemented from vtkScalarsToColors.

virtual void vtkLookupTable::GetIndexedColor ( vtkIdType  idx,
double  rgba[4] 
)
virtual

Return a color given an integer index. This is used to assign colors to annotations (given an offset into the list of annotations). If the table is empty or idx < 0, then NanColor is returned.

Reimplemented from vtkScalarsToColors.

void vtkLookupTable::ResizeTableForSpecialColors ( )
protected

Resize the LookupTable to have enough room for the out-of-range colors

Member Data Documentation

const vtkIdType vtkLookupTable::BELOW_RANGE_COLOR_INDEX
static

Constants for offsets of special colors (e.g., NanColor, BelowRangeColor, AboveRangeColor) from the maximum index in the lookup table.

Definition at line 80 of file vtkLookupTable.h.

const vtkIdType vtkLookupTable::ABOVE_RANGE_COLOR_INDEX
static

Constants for offsets of special colors (e.g., NanColor, BelowRangeColor, AboveRangeColor) from the maximum index in the lookup table.

Definition at line 81 of file vtkLookupTable.h.

const vtkIdType vtkLookupTable::NAN_COLOR_INDEX
static

Constants for offsets of special colors (e.g., NanColor, BelowRangeColor, AboveRangeColor) from the maximum index in the lookup table.

Definition at line 82 of file vtkLookupTable.h.

const vtkIdType vtkLookupTable::NUMBER_OF_SPECIAL_COLORS
static

Constants for offsets of special colors (e.g., NanColor, BelowRangeColor, AboveRangeColor) from the maximum index in the lookup table.

Definition at line 83 of file vtkLookupTable.h.

vtkIdType vtkLookupTable::NumberOfColors
protected

Definition at line 349 of file vtkLookupTable.h.

vtkUnsignedCharArray* vtkLookupTable::Table
protected

Definition at line 350 of file vtkLookupTable.h.

double vtkLookupTable::TableRange[2]
protected

Definition at line 351 of file vtkLookupTable.h.

double vtkLookupTable::HueRange[2]
protected

Definition at line 352 of file vtkLookupTable.h.

double vtkLookupTable::SaturationRange[2]
protected

Definition at line 353 of file vtkLookupTable.h.

double vtkLookupTable::ValueRange[2]
protected

Definition at line 354 of file vtkLookupTable.h.

double vtkLookupTable::AlphaRange[2]
protected

Definition at line 355 of file vtkLookupTable.h.

double vtkLookupTable::NanColor[4]
protected

Definition at line 356 of file vtkLookupTable.h.

double vtkLookupTable::BelowRangeColor[4]
protected

Definition at line 357 of file vtkLookupTable.h.

int vtkLookupTable::UseBelowRangeColor
protected

Definition at line 358 of file vtkLookupTable.h.

double vtkLookupTable::AboveRangeColor[4]
protected

Definition at line 359 of file vtkLookupTable.h.

int vtkLookupTable::UseAboveRangeColor
protected

Definition at line 360 of file vtkLookupTable.h.

int vtkLookupTable::Scale
protected

Definition at line 362 of file vtkLookupTable.h.

int vtkLookupTable::Ramp
protected

Definition at line 363 of file vtkLookupTable.h.

vtkTimeStamp vtkLookupTable::InsertTime
protected

Definition at line 364 of file vtkLookupTable.h.

vtkTimeStamp vtkLookupTable::BuildTime
protected

Definition at line 365 of file vtkLookupTable.h.

double vtkLookupTable::RGBA[4]
protected

Definition at line 366 of file vtkLookupTable.h.

unsigned char vtkLookupTable::NanColorChar[4]
protected

Definition at line 367 of file vtkLookupTable.h.

int vtkLookupTable::OpaqueFlag
protected

Definition at line 369 of file vtkLookupTable.h.

vtkTimeStamp vtkLookupTable::OpaqueFlagBuildTime
protected

Definition at line 370 of file vtkLookupTable.h.


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