VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkDiscretizableColorTransferFunction Class Reference

a combination of vtkColorTransferFunction and vtkLookupTable. More...

#include <vtkDiscretizableColorTransferFunction.h>

Inheritance diagram for vtkDiscretizableColorTransferFunction:
Inheritance graph
[legend]
Collaboration diagram for vtkDiscretizableColorTransferFunction:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkColorTransferFunction Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkDiscretizableColorTransferFunctionNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
int IsOpaque ()
virtual void Build ()
virtual unsigned char * MapValue (double v)
virtual void GetColor (double v, double rgb[3])
virtual double GetOpacity (double v)
doubleGetRGBPoints ()
virtual void SetAlpha (double alpha)
virtual vtkIdType GetNumberOfAvailableColors ()
virtual void SetDiscretize (int)
virtual int GetDiscretize ()
virtual void DiscretizeOn ()
virtual void DiscretizeOff ()
virtual void SetUseLogScale (int useLogScale)
virtual int GetUseLogScale ()
void SetNumberOfValues (vtkIdType number)
virtual vtkIdType GetNumberOfValues ()
virtual vtkUnsignedCharArrayMapScalars (vtkDataArray *scalars, int colorMode, int component)
virtual void SetNanColor (double r, double g, double b)
virtual void SetNanColor (double rgb[3])
virtual int UsingLogScale ()
virtual void SetScalarOpacityFunction (vtkPiecewiseFunction *function)
virtual vtkPiecewiseFunctionGetScalarOpacityFunction () const
virtual void SetEnableOpacityMapping (bool)
virtual bool GetEnableOpacityMapping ()
virtual void EnableOpacityMappingOn ()
virtual void EnableOpacityMappingOff ()

Static Public Member Functions

static
vtkDiscretizableColorTransferFunction
New ()
static int IsTypeOf (const char *type)
static
vtkDiscretizableColorTransferFunction
SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkDiscretizableColorTransferFunction ()
 ~vtkDiscretizableColorTransferFunction ()
void ScalarOpacityFunctionModified ()

Protected Attributes

int Discretize
int UseLogScale
vtkIdType NumberOfValues
vtkLookupTableLookupTable
vtkTimeStamp BuildTime
bool EnableOpacityMapping
vtkSmartPointer
< vtkPiecewiseFunction
ScalarOpacityFunction
unsigned long ScalarOpacityFunctionObserverId

Detailed Description

a combination of vtkColorTransferFunction and vtkLookupTable.

This is a cross between a vtkColorTransferFunction and a vtkLookupTable selectively combiniting the functionality of both. NOTE: One must call Build() after making any changes to the points in the ColorTransferFunction to ensure that the discrete and non-discrete version match up.

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 MapScalars behaves; when IndexedLookup is true, MapScalars 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.

Tests:
vtkDiscretizableColorTransferFunction (Tests)

Definition at line 53 of file vtkDiscretizableColorTransferFunction.h.


Member Typedef Documentation

Reimplemented from vtkColorTransferFunction.

Definition at line 57 of file vtkDiscretizableColorTransferFunction.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkColorTransferFunction.

static int vtkDiscretizableColorTransferFunction::IsTypeOf ( const char *  name) [static]

Return 1 if this class type 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.

virtual int vtkDiscretizableColorTransferFunction::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 vtkColorTransferFunction.

Reimplemented from vtkColorTransferFunction.

Reimplemented from vtkColorTransferFunction.

Reimplemented from vtkColorTransferFunction.

void vtkDiscretizableColorTransferFunction::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Print method for vtkColorTransferFunction

Reimplemented from vtkColorTransferFunction.

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

Reimplemented from vtkScalarsToColors.

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.

Set if the values are to 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.

Set if the values are to 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.

Set if the values are to 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.

Set if the values are to 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 void vtkDiscretizableColorTransferFunction::SetUseLogScale ( int  useLogScale) [virtual]

Get/Set if log scale must be used while mapping scalars to colors. The default is 0.

Get/Set if log scale must be used while mapping scalars to colors. The default is 0.

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

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

virtual unsigned char* vtkDiscretizableColorTransferFunction::MapValue ( double  v) [virtual]

Map one value through the lookup table and return a color defined as a RGBA unsigned char tuple (4 bytes).

Reimplemented from vtkColorTransferFunction.

virtual void vtkDiscretizableColorTransferFunction::GetColor ( double  v,
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 vtkColorTransferFunction.

Return the opacity of a given scalar.

Reimplemented from vtkScalarsToColors.

virtual vtkUnsignedCharArray* vtkDiscretizableColorTransferFunction::MapScalars ( vtkDataArray scalars,
int  colorMode,
int  component 
) [virtual]

An internal method maps 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.

Returns the (x, r, g, b) values as an array.

virtual void vtkDiscretizableColorTransferFunction::SetAlpha ( double  alpha) [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 void vtkDiscretizableColorTransferFunction::SetNanColor ( double  r,
double  g,
double  b 
) [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.

virtual void vtkDiscretizableColorTransferFunction::SetNanColor ( double  rgb[3]) [inline, 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.

Definition at line 135 of file vtkDiscretizableColorTransferFunction.h.

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

Reimplemented from vtkScalarsToColors.

Definition at line 144 of file vtkDiscretizableColorTransferFunction.h.

Get the number of available colors for mapping to.

Reimplemented from vtkColorTransferFunction.

Set/get the opacity function to use.

Set/get the opacity function to use.

Enable/disable the usage of the scalar opacity function.

Enable/disable the usage of the scalar opacity function.

Enable/disable the usage of the scalar opacity function.

Enable/disable the usage of the scalar opacity function.

Called when ScalarOpacityFunction is modified.


Member Data Documentation

Definition at line 171 of file vtkDiscretizableColorTransferFunction.h.

Definition at line 172 of file vtkDiscretizableColorTransferFunction.h.

Definition at line 174 of file vtkDiscretizableColorTransferFunction.h.

Definition at line 175 of file vtkDiscretizableColorTransferFunction.h.

Reimplemented from vtkColorTransferFunction.

Definition at line 177 of file vtkDiscretizableColorTransferFunction.h.

Definition at line 179 of file vtkDiscretizableColorTransferFunction.h.

Definition at line 180 of file vtkDiscretizableColorTransferFunction.h.

Definition at line 181 of file vtkDiscretizableColorTransferFunction.h.


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