Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkLabeledDataMapper Class Reference

`#include <vtkLabeledDataMapper.h>`

Inheritance diagram for vtkLabeledDataMapper:

[legend]
Collaboration diagram for vtkLabeledDataMapper:

[legend]
List of all members.

## Detailed Description

draw text labels at dataset points

Date:
  2002/11/11 21:41:40

Revision:
  1.30

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

Created by:
  - Schroeder, Will

CVS contributions (if > 5%):
  - Schroeder, Will (40%)
  - Barre, Sebastien (29%)
  - Miller, Jim (9%)
  - Martin, Ken (8%)

CVS logs (CVSweb):
  - .`cxx` (`/Rendering/vtkLabeledDataMapper.cxx)`
  - .`h` (`/Rendering/vtkLabeledDataMapper.h)`

Examples:
  vtkLabeledDataMapper (Examples)

Tests:
  vtkLabeledDataMapper (Tests)

Definition at line 85 of file vtkLabeledDataMapper.h.

## Public Types

typedef vtkMapper2D | Superclass

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
virtual void | ReleaseGraphicsResources (vtkWindow *)
virtual void | SetLabelFormat (const char *)
virtual char * | GetLabelFormat ()
virtual void | SetLabeledComponent (int)
virtual int | GetLabeledComponent ()
virtual void | SetFieldDataArray (int)
virtual int | GetFieldDataArray ()
virtual void | SetInput (vtkDataSet *)
virtual vtkDataSet * | GetInput ()
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 vtkTextProperty * | GetLabelTextProperty ()
virtual void | SetFontFamily (int val)
virtual int | GetFontFamily ()
void | SetFontFamilyToArial ()
void | SetFontFamilyToCourier ()
void | SetFontFamilyToTimes ()
virtual void | SetFontSize (int size)
virtual int | GetFontSize ()
virtual void | SetBold (int val)
virtual int | GetBold ()
virtual void | BoldOn ()
virtual void | BoldOff ()
virtual void | SetItalic (int val)
virtual int | GetItalic ()
virtual void | ItalicOn ()
virtual void | ItalicOff ()
virtual void | SetShadow (int val)
virtual int | GetShadow ()
virtual void | ShadowOn ()
virtual void | ShadowOff ()
void | RenderOpaqueGeometry (vtkViewport *viewport, vtkActor2D *actor)
void | RenderOverlay (vtkViewport *viewport, vtkActor2D *actor)

## Static Public Methods

vtkLabeledDataMapper * | New ()
int | IsTypeOf (const char *type)
vtkLabeledDataMapper * | SafeDownCast (vtkObject *o)

## Protected Methods

| vtkLabeledDataMapper ()
| ~vtkLabeledDataMapper ()

## Protected Attributes

vtkDataSet * | Input
vtkTextProperty * | LabelTextProperty
char * | LabelFormat
int | LabelMode
int | LabeledComponent
int | FieldDataArray
vtkTimeStamp | BuildTime

## Member Typedef Documentation

typedef vtkMapper2D vtkLabeledDataMapper::Superclass

| Reimplemented from vtkMapper2D. Definition at line 92 of file vtkLabeledDataMapper.h.

## Constructor & Destructor Documentation

vtkLabeledDataMapper::vtkLabeledDataMapper | ( |  | ) | `[protected]`

vtkLabeledDataMapper::~vtkLabeledDataMapper | ( |  | ) | `[protected]`

## Member Function Documentation

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

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

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

| Reimplemented from vtkMapper2D.

int vtkLabeledDataMapper::IsTypeOf | ( | const char * | type | ) | `[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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkMapper2D.

virtual int vtkLabeledDataMapper::IsA | ( | const char * | type | ) | `[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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkMapper2D.

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

| Reimplemented from vtkMapper2D.

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.

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

| Set/Get the format with which to print the labels. The format needs to change depending on what you're trying to print. For example, if you're printing a vector, 3 values are printed, whereas when printing an id only one value is printed. See also the ivar LabeledComponent which can be used to specify the component to print if you want to only print one of several.

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

| Set/Get the format with which to print the labels. The format needs to change depending on what you're trying to print. For example, if you're printing a vector, 3 values are printed, whereas when printing an id only one value is printed. See also the ivar LabeledComponent which can be used to specify the component to print if you want to only print one of several.

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.

virtual void vtkLabeledDataMapper::SetFieldDataArray | ( | int |  | ) | `[virtual]`

| Set/Get the field data array to label. This instance variable is only applicable if field data is labeled.

virtual int vtkLabeledDataMapper::GetFieldDataArray | ( |  | ) | `[virtual]`

| Set/Get the field data array to label. This instance variable is only applicable if field data is labeled.

virtual void vtkLabeledDataMapper::SetInput | ( | vtkDataSet * |  | ) | `[virtual]`

| Set the input dataset to the mapper.

virtual vtkDataSet* vtkLabeledDataMapper::GetInput | ( |  | ) | `[virtual]`

| Set the input dataset to the mapper.

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

| Specify which data to plot: 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.

virtual int vtkLabeledDataMapper::GetLabelMode | ( |  | ) | `[virtual]`

| Specify which data to plot: 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.

void vtkLabeledDataMapper::SetLabelModeToLabelIds | ( |  | ) | `[inline]`

| Specify which data to plot: 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. Definition at line 136 of file vtkLabeledDataMapper.h. References VTK_LABEL_IDS.

void vtkLabeledDataMapper::SetLabelModeToLabelScalars | ( |  | ) | `[inline]`

| Specify which data to plot: 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. Definition at line 137 of file vtkLabeledDataMapper.h. References VTK_LABEL_SCALARS.

void vtkLabeledDataMapper::SetLabelModeToLabelVectors | ( |  | ) | `[inline]`

| Specify which data to plot: 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. Definition at line 138 of file vtkLabeledDataMapper.h. References VTK_LABEL_VECTORS.

void vtkLabeledDataMapper::SetLabelModeToLabelNormals | ( |  | ) | `[inline]`

| Specify which data to plot: 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. Definition at line 139 of file vtkLabeledDataMapper.h. References VTK_LABEL_NORMALS.

void vtkLabeledDataMapper::SetLabelModeToLabelTCoords | ( |  | ) | `[inline]`

| Specify which data to plot: 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. Definition at line 140 of file vtkLabeledDataMapper.h. References VTK_LABEL_TCOORDS.

void vtkLabeledDataMapper::SetLabelModeToLabelTensors | ( |  | ) | `[inline]`

| Specify which data to plot: 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. Definition at line 141 of file vtkLabeledDataMapper.h. References VTK_LABEL_TENSORS.

void vtkLabeledDataMapper::SetLabelModeToLabelFieldData | ( |  | ) | `[inline]`

| Specify which data to plot: 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. Definition at line 142 of file vtkLabeledDataMapper.h. References VTK_LABEL_FIELD_DATA.

virtual void vtkLabeledDataMapper::SetLabelTextProperty | ( | vtkTextProperty * | p | ) | `[virtual]`

| Set/Get the text property.

virtual vtkTextProperty* vtkLabeledDataMapper::GetLabelTextProperty | ( |  | ) | `[virtual]`

| Set/Get the text property.

virtual void vtkLabeledDataMapper::SetFontFamily | ( | int | val | ) | `[virtual]`

| Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual int vtkLabeledDataMapper::GetFontFamily | ( |  | ) | `[virtual]`

| Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

void vtkLabeledDataMapper::SetFontFamilyToArial | ( |  | ) | `[inline]`

| Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods. Definition at line 160 of file vtkLabeledDataMapper.h. References VTK_ARIAL.

void vtkLabeledDataMapper::SetFontFamilyToCourier | ( |  | ) | `[inline]`

| Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods. Definition at line 161 of file vtkLabeledDataMapper.h. References VTK_COURIER.

void vtkLabeledDataMapper::SetFontFamilyToTimes | ( |  | ) | `[inline]`

| Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods. Definition at line 162 of file vtkLabeledDataMapper.h. References VTK_TIMES.

virtual void vtkLabeledDataMapper::SetFontSize | ( | int | size | ) | `[virtual]`

| Set/Get the font size. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual int vtkLabeledDataMapper::GetFontSize | ( |  | ) | `[virtual]`

| Set/Get the font size. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::SetBold | ( | int | val | ) | `[virtual]`

| Enable/disable text bolding. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual int vtkLabeledDataMapper::GetBold | ( |  | ) | `[virtual]`

| Enable/disable text bolding. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::BoldOn | ( |  | ) | `[virtual]`

| Enable/disable text bolding. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::BoldOff | ( |  | ) | `[virtual]`

| Enable/disable text bolding. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::SetItalic | ( | int | val | ) | `[virtual]`

| Enable/disable text italic. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual int vtkLabeledDataMapper::GetItalic | ( |  | ) | `[virtual]`

| Enable/disable text italic. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::ItalicOn | ( |  | ) | `[virtual]`

| Enable/disable text italic. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::ItalicOff | ( |  | ) | `[virtual]`

| Enable/disable text italic. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::SetShadow | ( | int | val | ) | `[virtual]`

| Enable/disable text shadows. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual int vtkLabeledDataMapper::GetShadow | ( |  | ) | `[virtual]`

| Enable/disable text shadows. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::ShadowOn | ( |  | ) | `[virtual]`

| Enable/disable text shadows. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

virtual void vtkLabeledDataMapper::ShadowOff | ( |  | ) | `[virtual]`

| Enable/disable text shadows. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)LabelTextProperty() methods.

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

| Draw the text to the screen at each input point. Reimplemented from vtkMapper2D.

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

| Draw the text to the screen at each input point. Reimplemented from vtkMapper2D.

virtual void vtkLabeledDataMapper::ReleaseGraphicsResources | ( | vtkWindow * |  | ) | `[virtual]`

| Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release. Reimplemented from vtkAbstractMapper.

## Member Data Documentation

vtkDataSet* vtkLabeledDataMapper::Input`[protected]`

| Definition at line 224 of file vtkLabeledDataMapper.h.

vtkTextProperty* vtkLabeledDataMapper::LabelTextProperty`[protected]`

| Definition at line 225 of file vtkLabeledDataMapper.h.

char* vtkLabeledDataMapper::LabelFormat`[protected]`

| Definition at line 227 of file vtkLabeledDataMapper.h.

int vtkLabeledDataMapper::LabelMode`[protected]`

| Definition at line 228 of file vtkLabeledDataMapper.h.

int vtkLabeledDataMapper::LabeledComponent`[protected]`

| Definition at line 229 of file vtkLabeledDataMapper.h.

int vtkLabeledDataMapper::FieldDataArray`[protected]`

| Definition at line 230 of file vtkLabeledDataMapper.h.

vtkTimeStamp vtkLabeledDataMapper::BuildTime`[protected]`

| Definition at line 232 of file vtkLabeledDataMapper.h.

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

- Rendering/vtkLabeledDataMapper.h