FreeMat: vtkLabeledDataMapper

FreeMat

- Main Page
- Related Pages

vtkLabeledDataMapper

Section: Visualization Toolkit Rendering Classes

# Usage

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.)

To create an instance of class vtkLabeledDataMapper, simply invoke its constructor as follows

      obj = vtkLabeledDataMapper

# Methods

The class vtkLabeledDataMapper has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkLabeledDataMapper class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkLabeledDataMapper = obj.NewInstance ()`
- `vtkLabeledDataMapper = obj.SafeDownCast (vtkObject o)`

- `obj.SetLabelFormat (string )` - 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.

- `string = obj.GetLabelFormat ()` - 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.

- `obj.SetLabeledComponent (int )` - 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.
- `int = obj.GetLabeledComponent ()` - 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.
- `obj.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.
- `int = obj.GetFieldDataArray ()` - 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.
- `obj.SetFieldDataName (string 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.
- `string = obj.GetFieldDataName ()` - 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.
- `obj.SetInput (vtkDataObject )` - Set the input dataset to the mapper. This mapper handles any type of data.
- `vtkDataSet = obj.GetInput ()` - Use GetInputDataObject() to get the input data object for composite datasets.
- `obj.SetLabelMode (int )` - 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.
- `int = obj.GetLabelMode ()` - 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.
- `obj.SetLabelModeToLabelIds ()` - 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.
- `obj.SetLabelModeToLabelScalars ()` - 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.
- `obj.SetLabelModeToLabelVectors ()` - 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.
- `obj.SetLabelModeToLabelNormals ()` - 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.
- `obj.SetLabelModeToLabelTCoords ()` - 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.
- `obj.SetLabelModeToLabelTensors ()` - 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.
- `obj.SetLabelModeToLabelFieldData ()` - 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.
- `obj.SetLabelTextProperty (vtkTextProperty p)` - 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.
- `vtkTextProperty = obj.GetLabelTextProperty ()` - 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.
- `obj.SetLabelTextProperty (vtkTextProperty p, int type)` - 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.
- `vtkTextProperty = obj.GetLabelTextProperty (int type)` - 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.
- `obj.RenderOpaqueGeometry (vtkViewport viewport, vtkActor2D actor)` - Draw the text to the screen at each input point.
- `obj.RenderOverlay (vtkViewport viewport, vtkActor2D actor)` - Draw the text to the screen at each input point.
- `obj.ReleaseGraphicsResources (vtkWindow )` - Release any graphics resources that are being consumed by this actor.
- `vtkTransform = obj.GetTransform ()` - The transform to apply to the labels before mapping to 2D.
- `obj.SetTransform (vtkTransform t)` - The transform to apply to the labels before mapping to 2D.
- `int = obj.GetCoordinateSystem ()` - Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.
- `obj.SetCoordinateSystem (int )` - Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.
- `int = obj.GetCoordinateSystemMinValue ()` - Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.
- `int = obj.GetCoordinateSystemMaxValue ()` - Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.
- `obj.CoordinateSystemWorld ()` - Set/get the coordinate system used for output labels. The output datasets may have point coordinates reported in the world space or display space.
- `obj.CoordinateSystemDisplay ()` - Return the modified time for this object.
- `long = obj.GetMTime ()` - Return the modified time for this object.