vtkLabeledDataMapper Class Reference

#include <vtkLabeledDataMapper.h>

Inheritance diagram for vtkLabeledDataMapper:

Inheritance graph
[legend]
Collaboration diagram for vtkLabeledDataMapper:

Collaboration graph
[legend]

List of all members.


Detailed Description

draw text labels at dataset points

vtkLabeledDataMapper is a mapper that renders text at dataset points. Various items can be labeled including point ids, scalars, vectors, normals, texture coordinates, tensors, and field data components.

The format with which the label is drawn is specified using a printf style format string. The font attributes of the text can be set through the vtkTextProperty associated to this mapper.

By default, all the components of multi-component data such as vectors, normals, texture coordinates, tensors, and multi-component scalars are labeled. However, you can specify a single component if you prefer. (Note: the label format specifies the format to use for a single component. The label is creating by looping over all components and using the label format to render each component.)

Warning:
Use this filter in combination with vtkSelectVisiblePoints if you want to label only points that are visible. If you want to label cells rather than points, use the filter vtkCellCenters to generate points at the center of the cells. Also, you can use the class vtkIdFilter to generate ids as scalars or field data, which can then be labeled.
See also:
vtkMapper2D vtkActor2D vtkTextMapper vtkTextProperty vtkSelectVisiblePoints vtkIdFilter vtkCellCenters
Examples:
vtkLabeledDataMapper (Examples)
Tests:
vtkLabeledDataMapper (Tests)

Definition at line 70 of file vtkLabeledDataMapper.h.


Public Types

enum  Coordinates { WORLD = 0, DISPLAY = 1 }
 Coordinate systems that output dataset may use. More...
typedef vtkMapper2D Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetInput (vtkDataObject *)
vtkDataSetGetInput ()
virtual void ReleaseGraphicsResources (vtkWindow *)
virtual unsigned long GetMTime ()
virtual void SetLabelFormat (const char *)
virtual char * GetLabelFormat ()
virtual void SetLabeledComponent (int)
virtual int GetLabeledComponent ()
void SetFieldDataArray (int arrayIndex)
virtual int GetFieldDataArray ()
void SetFieldDataName (const char *arrayName)
virtual char * GetFieldDataName ()
virtual void SetLabelMode (int)
virtual int GetLabelMode ()
void SetLabelModeToLabelIds ()
void SetLabelModeToLabelScalars ()
void SetLabelModeToLabelVectors ()
void SetLabelModeToLabelNormals ()
void SetLabelModeToLabelTCoords ()
void SetLabelModeToLabelTensors ()
void SetLabelModeToLabelFieldData ()
virtual void SetLabelTextProperty (vtkTextProperty *p)
virtual vtkTextPropertyGetLabelTextProperty ()
virtual void SetLabelTextProperty (vtkTextProperty *p, int type)
virtual vtkTextPropertyGetLabelTextProperty (int type)
void RenderOpaqueGeometry (vtkViewport *viewport, vtkActor2D *actor)
void RenderOverlay (vtkViewport *viewport, vtkActor2D *actor)
virtual vtkTransformGetTransform ()
void SetTransform (vtkTransform *t)
virtual int GetCoordinateSystem ()
virtual void SetCoordinateSystem (int)
void CoordinateSystemWorld ()
void CoordinateSystemDisplay ()

Static Public Member Functions

static vtkLabeledDataMapperNew ()
static int IsTypeOf (const char *type)
static vtkLabeledDataMapperSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkLabeledDataMapper ()
 ~vtkLabeledDataMapper ()
virtual int FillInputPortInformation (int, vtkInformation *)
void AllocateLabels (int numLabels)
void BuildLabels ()
void BuildLabelsInternal (vtkDataSet *)

Protected Attributes

vtkDataSetInput
char * LabelFormat
int LabelMode
int LabeledComponent
int FieldDataArray
char * FieldDataName
int CoordinateSystem
vtkTimeStamp BuildTime
int NumberOfLabels
int NumberOfLabelsAllocated
vtkTextMapper ** TextMappers
double * LabelPositions
vtkTransformTransform
Internals * Implementation

Member Typedef Documentation

Reimplemented from vtkMapper2D.

Reimplemented in vtkDynamic2DLabelMapper, vtkLabeledTreeMapDataMapper, and vtkQtTreeRingLabelMapper.

Definition at line 77 of file vtkLabeledDataMapper.h.


Member Enumeration Documentation

Coordinate systems that output dataset may use.

Enumerator:
WORLD  Output 3-D world-space coordinates for each label anchor.
DISPLAY  Output 2-D display coordinates for each label anchor (3 components but only 2 are significant).

Definition at line 173 of file vtkLabeledDataMapper.h.


Constructor & Destructor Documentation

vtkLabeledDataMapper::vtkLabeledDataMapper (  )  [protected]

vtkLabeledDataMapper::~vtkLabeledDataMapper (  )  [protected]


Member Function Documentation

static vtkLabeledDataMapper* vtkLabeledDataMapper::New (  )  [static]

Instantiate object with %-#6.3g label format. By default, point ids are labeled.

Reimplemented from vtkAlgorithm.

Reimplemented in vtkDynamic2DLabelMapper, vtkLabeledTreeMapDataMapper, and vtkQtTreeRingLabelMapper.

virtual const char* vtkLabeledDataMapper::GetClassName (  )  [virtual]

static int vtkLabeledDataMapper::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 vtkMapper2D.

Reimplemented in vtkDynamic2DLabelMapper, vtkLabeledTreeMapDataMapper, and vtkQtTreeRingLabelMapper.

virtual int vtkLabeledDataMapper::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 vtkMapper2D.

Reimplemented in vtkDynamic2DLabelMapper, vtkLabeledTreeMapDataMapper, and vtkQtTreeRingLabelMapper.

static vtkLabeledDataMapper* vtkLabeledDataMapper::SafeDownCast ( vtkObject o  )  [static]

void vtkLabeledDataMapper::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 vtkMapper2D.

Reimplemented in vtkDynamic2DLabelMapper, vtkLabeledTreeMapDataMapper, and vtkQtTreeRingLabelMapper.

virtual void vtkLabeledDataMapper::SetLabelFormat ( const char *   )  [virtual]

Set/Get the format with which to print the labels. This should be a printf-style format string. By default, the mapper will try to print each component of the tuple using a sane format: d for integers, f for floats, g for doubles, ld for longs, et cetera. If you need a different format, set it here. You can do things like limit the number of significant digits, add prefixes/suffixes, basically anything that printf can do. If you only want to print one component of a vector, see the ivar LabeledComponent.

virtual char* vtkLabeledDataMapper::GetLabelFormat (  )  [virtual]

Set/Get the format with which to print the labels. This should be a printf-style format string. By default, the mapper will try to print each component of the tuple using a sane format: d for integers, f for floats, g for doubles, ld for longs, et cetera. If you need a different format, set it here. You can do things like limit the number of significant digits, add prefixes/suffixes, basically anything that printf can do. If you only want to print one component of a vector, see the ivar LabeledComponent.

virtual void vtkLabeledDataMapper::SetLabeledComponent ( int   )  [virtual]

Set/Get the component number to label if the data to print has more than one component. For example, all the components of scalars, vectors, normals, etc. are labeled by default (LabeledComponent=(-1)). However, if this ivar is nonnegative, then only the one component specified is labeled.

virtual int vtkLabeledDataMapper::GetLabeledComponent (  )  [virtual]

Set/Get the component number to label if the data to print has more than one component. For example, all the components of scalars, vectors, normals, etc. are labeled by default (LabeledComponent=(-1)). However, if this ivar is nonnegative, then only the one component specified is labeled.

void vtkLabeledDataMapper::SetFieldDataArray ( int  arrayIndex  ) 

Set/Get the field data array to label. This instance variable is only applicable if field data is labeled. This will clear FieldDataName when set.

virtual int vtkLabeledDataMapper::GetFieldDataArray (  )  [virtual]

Set/Get the field data array to label. This instance variable is only applicable if field data is labeled. This will clear FieldDataName when set.

void vtkLabeledDataMapper::SetFieldDataName ( const char *  arrayName  ) 

Set/Get the name of the field data array to label. This instance variable is only applicable if field data is labeled. This will override FieldDataArray when set.

virtual char* vtkLabeledDataMapper::GetFieldDataName (  )  [virtual]

Set/Get the name of the field data array to label. This instance variable is only applicable if field data is labeled. This will override FieldDataArray when set.

virtual void vtkLabeledDataMapper::SetInput ( vtkDataObject  )  [virtual]

Set the input dataset to the mapper. This mapper handles any type of data.

vtkDataSet* vtkLabeledDataMapper::GetInput (  ) 

Use GetInputDataObject() to get the input data object for composite datasets.

virtual void vtkLabeledDataMapper::SetLabelMode ( int   )  [virtual]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

virtual int vtkLabeledDataMapper::GetLabelMode (  )  [virtual]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

void vtkLabeledDataMapper::SetLabelModeToLabelIds (  )  [inline]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

Definition at line 134 of file vtkLabeledDataMapper.h.

void vtkLabeledDataMapper::SetLabelModeToLabelScalars (  )  [inline]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

Definition at line 135 of file vtkLabeledDataMapper.h.

void vtkLabeledDataMapper::SetLabelModeToLabelVectors (  )  [inline]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

Definition at line 136 of file vtkLabeledDataMapper.h.

void vtkLabeledDataMapper::SetLabelModeToLabelNormals (  )  [inline]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

Definition at line 137 of file vtkLabeledDataMapper.h.

void vtkLabeledDataMapper::SetLabelModeToLabelTCoords (  )  [inline]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

Definition at line 138 of file vtkLabeledDataMapper.h.

void vtkLabeledDataMapper::SetLabelModeToLabelTensors (  )  [inline]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

Definition at line 139 of file vtkLabeledDataMapper.h.

void vtkLabeledDataMapper::SetLabelModeToLabelFieldData (  )  [inline]

Specify which data to plot: IDs, scalars, vectors, normals, texture coords, tensors, or field data. If the data has more than one component, use the method SetLabeledComponent to control which components to plot. The default is VTK_LABEL_IDS.

Definition at line 140 of file vtkLabeledDataMapper.h.

virtual void vtkLabeledDataMapper::SetLabelTextProperty ( vtkTextProperty p  )  [inline, virtual]

Set/Get the text property. If an integer argument is provided, you may provide different text properties for different label types. The type is determined by an optional type input array.

Reimplemented in vtkQtTreeRingLabelMapper.

Definition at line 148 of file vtkLabeledDataMapper.h.

virtual vtkTextProperty* vtkLabeledDataMapper::GetLabelTextProperty (  )  [inline, virtual]

Set/Get the text property. If an integer argument is provided, you may provide different text properties for different label types. The type is determined by an optional type input array.

Reimplemented in vtkQtTreeRingLabelMapper.

Definition at line 150 of file vtkLabeledDataMapper.h.

virtual void vtkLabeledDataMapper::SetLabelTextProperty ( vtkTextProperty p,
int  type 
) [virtual]

Set/Get the text property. If an integer argument is provided, you may provide different text properties for different label types. The type is determined by an optional type input array.

Reimplemented in vtkQtTreeRingLabelMapper.

virtual vtkTextProperty* vtkLabeledDataMapper::GetLabelTextProperty ( int  type  )  [virtual]

Set/Get the text property. If an integer argument is provided, you may provide different text properties for different label types. The type is determined by an optional type input array.

Reimplemented in vtkQtTreeRingLabelMapper.

void vtkLabeledDataMapper::RenderOpaqueGeometry ( vtkViewport viewport,
vtkActor2D actor 
) [virtual]

Draw the text to the screen at each input point.

Reimplemented from vtkMapper2D.

Reimplemented in vtkDynamic2DLabelMapper, vtkLabeledTreeMapDataMapper, and vtkQtTreeRingLabelMapper.

void vtkLabeledDataMapper::RenderOverlay ( vtkViewport viewport,
vtkActor2D actor 
) [virtual]

Draw the text to the screen at each input point.

Reimplemented from vtkMapper2D.

Reimplemented in vtkDynamic2DLabelMapper, vtkLabeledTreeMapDataMapper, and vtkQtTreeRingLabelMapper.

virtual void vtkLabeledDataMapper::ReleaseGraphicsResources ( vtkWindow  )  [virtual]

Release any graphics resources that are being consumed by this actor.

Reimplemented from vtkAbstractMapper.

Reimplemented in vtkLabeledTreeMapDataMapper.

virtual vtkTransform* vtkLabeledDataMapper::GetTransform (  )  [virtual]

The transform to apply to the labels before mapping to 2D.

void vtkLabeledDataMapper::SetTransform ( vtkTransform t  ) 

The transform to apply to the labels before mapping to 2D.

virtual int vtkLabeledDataMapper::GetCoordinateSystem (  )  [virtual]

Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.

virtual void vtkLabeledDataMapper::SetCoordinateSystem ( int   )  [virtual]

Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.

void vtkLabeledDataMapper::CoordinateSystemWorld (  )  [inline]

Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.

Definition at line 186 of file vtkLabeledDataMapper.h.

void vtkLabeledDataMapper::CoordinateSystemDisplay (  )  [inline]

Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.

Definition at line 187 of file vtkLabeledDataMapper.h.

virtual unsigned long vtkLabeledDataMapper::GetMTime (  )  [virtual]

Return the modified time for this object.

Reimplemented from vtkAbstractMapper.

Reimplemented in vtkQtTreeRingLabelMapper.

virtual int vtkLabeledDataMapper::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkAlgorithm.

void vtkLabeledDataMapper::AllocateLabels ( int  numLabels  )  [protected]

void vtkLabeledDataMapper::BuildLabels (  )  [protected]

void vtkLabeledDataMapper::BuildLabelsInternal ( vtkDataSet  )  [protected]


Member Data Documentation

Definition at line 197 of file vtkLabeledDataMapper.h.

Definition at line 199 of file vtkLabeledDataMapper.h.

Definition at line 200 of file vtkLabeledDataMapper.h.

Definition at line 201 of file vtkLabeledDataMapper.h.

Definition at line 202 of file vtkLabeledDataMapper.h.

Definition at line 203 of file vtkLabeledDataMapper.h.

Definition at line 204 of file vtkLabeledDataMapper.h.

Definition at line 206 of file vtkLabeledDataMapper.h.

Definition at line 208 of file vtkLabeledDataMapper.h.

Definition at line 209 of file vtkLabeledDataMapper.h.

Definition at line 210 of file vtkLabeledDataMapper.h.

Definition at line 211 of file vtkLabeledDataMapper.h.

Definition at line 212 of file vtkLabeledDataMapper.h.

Internals* vtkLabeledDataMapper::Implementation [protected]

Definition at line 221 of file vtkLabeledDataMapper.h.


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

Generated on Wed Aug 24 11:44:59 2011 for VTK by  doxygen 1.5.6