Documentation for vtkMapper

vtkMapper - abstract class specifies interface to map data to graphics primitives

Super Class: vtkProcessObject

Description:

vtkMapper is an abstract class to specify interface between data and graphics primitives. Subclasses of vtkMapper map data through a lookuptable and control the creation of rendering primitives that interface to the graphics library. The mapping can be controlled by supplying a lookup table and specifying a scalar range to map data through. There are several important control mechanisms affecting the behavior of this object. The ScalarVisibility flag controls whether scalar data (if any) controls the color of the associated actor(s) that refer to the mapper. The ScalarMode ivar is used to determine whether scalar point data or cell data is used to color the object. By default, point data scalars are used unless there are none, in which cell scalars are used. Or you can explicitly control whether to use point or cell scalar data. Finally, the mapping of scalars through the lookup table varies depending on the setting of the ColorMode flag. See the documentation for the appropriate methods for an explanation. Another important feature of this class is whether to use immediate mode rendering (ImmediateModeRenderingOn) or display list rendering (ImmediateModeRenderingOff). If display lists are used, a data structure is constructed (generally in the rendering library) which can then be rapidly traversed and rendered by the rendering library. The disadvantage of display lists is that they require additionally memory which may affect the perfomance of the system.

 

See Also:

vtkDataSetMapper vtkPolyDataMapper

 

Methods:

void vtkMapper ()
void vtkMapper ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
unsigned long GetMTime ()
void Render (vtkRenderer * ,vtkActor *)
void SetLookupTable (vtkLookupTable *)
vtkLookupTable *GetLookupTable ()
void CreateDefaultLookupTable ()
void SetScalarVisibility (int )
int GetScalarVisibility ()
void ScalarVisibilityOn ()
void ScalarVisibilityOff ()
void SetColorMode (int )
int GetColorMode ()
void SetColorModeToDefault ()
void SetColorModeToMapScalars ()
void SetColorModeToLuminance ()
char *GetColorModeAsString ()
void SetImmediateModeRendering (int )
int GetImmediateModeRendering ()
void ImmediateModeRenderingOn ()
void ImmediateModeRenderingOff ()
static void SetGlobalImmediateModeRendering (int )
static void GlobalImmediateModeRenderingOn ()
static void GlobalImmediateModeRenderingOff ()
static int GetGlobalImmediateModeRendering ()
void SetScalarRange (float ,float )
void SetScalarRange (float *)
float *GetScalarRange ()
float *GetBounds ()
void GetBounds (float )
float *GetCenter ()
float GetLength ()
void Update ()
vtkDataSet *GetInput ()
vtkScalars *GetColors ()
void SetScalarMode (int )
int GetScalarMode ()
void SetScalarModeToDefault ()
void SetScalarModeToUsePointData ()
void SetScalarModeToUseCellData ()
char *GetScalarModeAsString ()
void SetRenderTime (float )
float GetRenderTime ()
void SetLookupTable (vtkLookupTable &)

 

Detailed Method Descriptions:

Overload standard modified time function. If lookup table is modified, then this object is modified as well.

unsigned long GetMTime ()

Method initiates the mapping process. Generally sent by the actor as each frame is rendered.

void Render (vtkRenderer * ,vtkActor *)

Specify a lookup table for the mapper to use.

void SetLookupTable (vtkLookupTable *)
vtkLookupTable *GetLookupTable ()

Create default lookup table. Generally used to create one when none is available with the scalar data.

void CreateDefaultLookupTable ()

Turn on/off flag to control whether scalar data is used to color objects.

void SetScalarVisibility (int )
int GetScalarVisibility ()
void ScalarVisibilityOn ()
void ScalarVisibilityOff ()

Control how the scalar data is mapped to colors. By default (ColorModeToDefault), scalars that are unsigned char types are treated as colors, and NOT mapped through the lookup table, while everything else is. Setting ColorModeToMapScalars means that all scalar data will be mapped through the lookup table. Setting ColorModeToLuminance means that scalars will be converted to luminance (gray values) using the luminance equation . (The ColorMode ivar is used with vtkScalars to map scalar data to colors. See vtkScalars::InitColorTraversal() for more information.)

void SetColorMode (int )
int GetColorMode ()
void SetColorModeToDefault ()
void SetColorModeToMapScalars ()
void SetColorModeToLuminance ()

Return the method of coloring scalar data.

char *GetColorModeAsString ()

Turn on/off flag to control whether data is rendered using immediate mode or note. Immediate mode rendering tends to be slower but it can handle larger datasets. The default value is immediate mode off. If you are having problems rendering a large dataset you might want to consider using imediate more rendering.

void SetImmediateModeRendering (int )
int GetImmediateModeRendering ()
void ImmediateModeRenderingOn ()
void ImmediateModeRenderingOff ()
static void SetGlobalImmediateModeRendering (int )
static void GlobalImmediateModeRenderingOn ()
static void GlobalImmediateModeRenderingOff ()
static int GetGlobalImmediateModeRendering ()

Specify range in terms of scalar minimum and maximum (smin,smax). These values are used to map scalars into lookup table.

void SetScalarRange (float ,float )
void SetScalarRange (float *)
float *GetScalarRange ()

Return bounding box (array of six floats) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).

float *GetBounds ()

Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

void GetBounds (float )

Return the Center of this mapper's data.

float *GetCenter ()

Return the diagonal length of this mappers bounding box.

float GetLength ()

Update the network connected to this mapper.

void Update ()

Return the Input of this mapper.

vtkDataSet *GetInput ()

Calculate and return the colors for the input. After invoking this method, use GetColor() on the scalar to get the scalar values. This method may return NULL if no color information is available.

vtkScalars *GetColors ()

Control how the filter works with scalar point data and cell attribute data. By default (ScalarModeToDefault), the filter will use point data, and if no point data is available, then cell data is used. Alternatively you can explicitly set the filter to use point data (ScalarModeToUsePointData) or cell data (ScalarModeToUseCellData).

void SetScalarMode (int )
int GetScalarMode ()
void SetScalarModeToDefault ()
void SetScalarModeToUsePointData ()
void SetScalarModeToUseCellData ()

Return the method for obtaining scalar data.

char *GetScalarModeAsString ()

This instance variable is used by vtkLODActor to determine which mapper to use. It is an estimate of the time necessary to render. Setting the render time does not modify the mapper.

void SetRenderTime (float )
float GetRenderTime ()