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

map scalar values into colors or colors to scalars; generate color table More...

#include <vtkWindowLevelLookupTable.h>

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

Public Types

typedef vtkLookupTable Superclass
 
- Public Types inherited from vtkLookupTable
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)
 
vtkWindowLevelLookupTableNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void Build ()
 
void SetWindow (double window)
 
virtual double GetWindow ()
 
void SetLevel (double level)
 
virtual double GetLevel ()
 
void SetInverseVideo (int iv)
 
virtual int GetInverseVideo ()
 
virtual void InverseVideoOn ()
 
virtual void InverseVideoOff ()
 
virtual void SetMinimumTableValue (double, double, double, double)
 
virtual void SetMinimumTableValue (double[4])
 
virtual doubleGetMinimumTableValue ()
 
virtual void GetMinimumTableValue (double &, double &, double &, double &)
 
virtual void GetMinimumTableValue (double[4])
 
virtual void SetMaximumTableValue (double, double, double, double)
 
virtual void SetMaximumTableValue (double[4])
 
virtual doubleGetMaximumTableValue ()
 
virtual void GetMaximumTableValue (double &, double &, double &, double &)
 
virtual void GetMaximumTableValue (double[4])
 
- Public Member Functions inherited from vtkLookupTable
vtkLookupTableNewInstance () const
 
virtual int IsOpaque ()
 
int Allocate (int sz=256, int ext=256)
 
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
 
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 vtkWindowLevelLookupTableNew ()
 
static int IsTypeOf (const char *type)
 
static vtkWindowLevelLookupTableSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkLookupTable
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 ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkWindowLevelLookupTable (int sze=256, int ext=256)
 
 ~vtkWindowLevelLookupTable ()
 
- Protected Member Functions inherited from vtkLookupTable
 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

double Window
 
double Level
 
int InverseVideo
 
double MaximumTableValue [4]
 
double MinimumTableValue [4]
 
- Protected Attributes inherited from vtkLookupTable
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
 

Additional Inherited Members

- Static Public Attributes inherited from vtkLookupTable
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
 

Detailed Description

map scalar values into colors or colors to scalars; generate color table

vtkWindowLevelLookupTable 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 window and level. Window / Level is used in medical imaging to specify a linear greyscale ramp. The Level is the center of the ramp. The Window is the width of the ramp.

Warning
vtkWindowLevelLookupTable is a reference counted object. Therefore, you should always use operator "new" to construct new objects. This procedure will avoid memory problems (see text).
See also
vtkLogLookupTable

Definition at line 41 of file vtkWindowLevelLookupTable.h.

Member Typedef Documentation

Definition at line 45 of file vtkWindowLevelLookupTable.h.

Constructor & Destructor Documentation

vtkWindowLevelLookupTable::vtkWindowLevelLookupTable ( int  sze = 256,
int  ext = 256 
)
protected
vtkWindowLevelLookupTable::~vtkWindowLevelLookupTable ( )
inlineprotected

Definition at line 99 of file vtkWindowLevelLookupTable.h.

Member Function Documentation

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

static vtkWindowLevelLookupTable* vtkWindowLevelLookupTable::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkWindowLevelLookupTable::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkLookupTable.

vtkWindowLevelLookupTable* vtkWindowLevelLookupTable::NewInstance ( ) const
void vtkWindowLevelLookupTable::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 vtkLookupTable.

void vtkWindowLevelLookupTable::Build ( )
virtual

Generate lookup table as a linear ramp between MinimumTableValue and MaximumTableValue.

Reimplemented from vtkLookupTable.

void vtkWindowLevelLookupTable::SetWindow ( double  window)
inline

Set the window for the lookup table. The window is the difference between TableRange[0] and TableRange[1].

Definition at line 55 of file vtkWindowLevelLookupTable.h.

virtual double vtkWindowLevelLookupTable::GetWindow ( )
virtual

Set the window for the lookup table. The window is the difference between TableRange[0] and TableRange[1].

void vtkWindowLevelLookupTable::SetLevel ( double  level)
inline

Set the Level for the lookup table. The level is the average of TableRange[0] and TableRange[1].

Definition at line 66 of file vtkWindowLevelLookupTable.h.

virtual double vtkWindowLevelLookupTable::GetLevel ( )
virtual

Set the Level for the lookup table. The level is the average of TableRange[0] and TableRange[1].

void vtkWindowLevelLookupTable::SetInverseVideo ( int  iv)

Set inverse video on or off. You can achieve the same effect by switching the MinimumTableValue and the MaximumTableValue.

virtual int vtkWindowLevelLookupTable::GetInverseVideo ( )
virtual

Set inverse video on or off. You can achieve the same effect by switching the MinimumTableValue and the MaximumTableValue.

virtual void vtkWindowLevelLookupTable::InverseVideoOn ( )
virtual

Set inverse video on or off. You can achieve the same effect by switching the MinimumTableValue and the MaximumTableValue.

virtual void vtkWindowLevelLookupTable::InverseVideoOff ( )
virtual

Set inverse video on or off. You can achieve the same effect by switching the MinimumTableValue and the MaximumTableValue.

virtual void vtkWindowLevelLookupTable::SetMinimumTableValue ( double  ,
double  ,
double  ,
double   
)
virtual

Set the minimum table value. All lookup table entries below the start of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual void vtkWindowLevelLookupTable::SetMinimumTableValue ( double  [4])
virtual

Set the minimum table value. All lookup table entries below the start of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual double* vtkWindowLevelLookupTable::GetMinimumTableValue ( )
virtual

Set the minimum table value. All lookup table entries below the start of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual void vtkWindowLevelLookupTable::GetMinimumTableValue ( double ,
double ,
double ,
double  
)
virtual

Set the minimum table value. All lookup table entries below the start of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual void vtkWindowLevelLookupTable::GetMinimumTableValue ( double  [4])
virtual

Set the minimum table value. All lookup table entries below the start of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual void vtkWindowLevelLookupTable::SetMaximumTableValue ( double  ,
double  ,
double  ,
double   
)
virtual

Set the maximum table value. All lookup table entries above the end of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual void vtkWindowLevelLookupTable::SetMaximumTableValue ( double  [4])
virtual

Set the maximum table value. All lookup table entries above the end of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual double* vtkWindowLevelLookupTable::GetMaximumTableValue ( )
virtual

Set the maximum table value. All lookup table entries above the end of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual void vtkWindowLevelLookupTable::GetMaximumTableValue ( double ,
double ,
double ,
double  
)
virtual

Set the maximum table value. All lookup table entries above the end of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

virtual void vtkWindowLevelLookupTable::GetMaximumTableValue ( double  [4])
virtual

Set the maximum table value. All lookup table entries above the end of the ramp will be set to this color. After you change this value, you must re-build the lookup table.

Member Data Documentation

double vtkWindowLevelLookupTable::Window
protected

Definition at line 101 of file vtkWindowLevelLookupTable.h.

double vtkWindowLevelLookupTable::Level
protected

Definition at line 102 of file vtkWindowLevelLookupTable.h.

int vtkWindowLevelLookupTable::InverseVideo
protected

Definition at line 103 of file vtkWindowLevelLookupTable.h.

double vtkWindowLevelLookupTable::MaximumTableValue[4]
protected

Definition at line 104 of file vtkWindowLevelLookupTable.h.

double vtkWindowLevelLookupTable::MinimumTableValue[4]
protected

Definition at line 105 of file vtkWindowLevelLookupTable.h.


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