vtkLabeledDataMapper - draw text labels at dataset points
Super Class: vtkMapper2D
Description:
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 also be set (font style, size, bold, italic, shadow). The color of the text is controlled by the actor2D's color property (i.e., the actor associated with 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.)
Caveats:
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 vtkSelectVisiblePoints vtkIdFilter vtkCellCenters
Methods:
Detailed Method Descriptions:
void vtkLabeledDataMapper () |
void Render (vtkViewport * ,vtkActor2D *) |
void SetInput (vtkDataSet *) | |
vtkDataSet *GetInput () |
void SetLabelMode (int ) | |
int GetLabelMode () | |
void SetLabelModeToLabelIds () | |
void SetLabelModeToLabelScalars () | |
void SetLabelModeToLabelVectors () | |
void SetLabelModeToLabelNormals () | |
void SetLabelModeToLabelTCoords () | |
void SetLabelModeToLabelTensors () | |
void SetLabelModeToLabelFieldData () |
void SetFontSize (int ) | |
int GetFontSize () |
void SetBold (int ) | |
int GetBold () | |
void BoldOn () | |
void BoldOff () |
void SetItalic (int ) | |
int GetItalic () | |
void ItalicOn () | |
void ItalicOff () |
void SetShadow (int ) | |
int GetShadow () | |
void ShadowOn () | |
void ShadowOff () |
void SetFontFamily (int ) | |
int GetFontFamily () | |
void SetFontFamilyToArial () | |
void SetFontFamilyToCourier () | |
void SetFontFamilyToTimes () |
void SetLabelFormat (char *) | |
char *GetLabelFormat () |
void SetLabeledComponent (int ) | |
int GetLabeledComponent () |
void SetFieldDataArray (int ) | |
int GetFieldDataArray () |