VTK
Public Member Functions | Protected Member Functions | Protected Attributes
vtkDynamic2DLabelMapper Class Reference

draw text labels at 2D dataset points More...

#include <vtkDynamic2DLabelMapper.h>

Inheritance diagram for vtkDynamic2DLabelMapper:
Inheritance graph
[legend]
Collaboration diagram for vtkDynamic2DLabelMapper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetPriorityArrayName (const char *name)
virtual void SetReversePriority (bool)
virtual bool GetReversePriority ()
virtual void ReversePriorityOn ()
virtual void ReversePriorityOff ()
virtual void SetLabelHeightPadding (float)
virtual float GetLabelHeightPadding ()
virtual void SetLabelWidthPadding (float)
virtual float GetLabelWidthPadding ()
void RenderOpaqueGeometry (vtkViewport *viewport, vtkActor2D *actor)
void RenderOverlay (vtkViewport *viewport, vtkActor2D *actor)

Protected Member Functions

 vtkDynamic2DLabelMapper ()
 ~vtkDynamic2DLabelMapper ()
double GetCurrentScale (vtkViewport *viewport)

Protected Attributes

floatLabelWidth
floatLabelHeight
floatCutoff
float ReferenceScale
float LabelHeightPadding
float LabelWidthPadding
bool ReversePriority
typedef vtkLabeledDataMapper Superclass
static vtkDynamic2DLabelMapperNew ()
static int IsTypeOf (const char *type)
static vtkDynamic2DLabelMapperSafeDownCast (vtkObjectBase *o)
virtual int IsA (const char *type)
vtkDynamic2DLabelMapperNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkObjectBaseNewInstanceInternal () const

Detailed Description

draw text labels at 2D dataset points

vtkDynamic2DLabelMapper is a mapper that renders text at dataset points such that the labels do not overlap. Various items can be labeled including point ids, scalars, vectors, normals, texture coordinates, tensors, and field data components. This mapper assumes that the points are located on the x-y plane and that the camera remains perpendicular to that plane with a y-up axis (this can be constrained using vtkImageInteractor). On the first render, the mapper computes the visiblility of all labels at all scales, and queries this information on successive renders. This causes the first render to be much slower. The visibility algorithm is a greedy approach based on the point id, so the label for a point will be drawn unless the label for a point with lower id overlaps it.

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:
vtkLabeledDataMapper
Thanks:
This algorithm was developed in the paper Ken Been and Chee Yap. Dynamic Map Labeling. IEEE Transactions on Visualization and Computer Graphics, Vol. 12, No. 5, 2006. pp. 773-780.
Events:
vtkCommand::ProgressEvent
Examples:
vtkDynamic2DLabelMapper (Examples)
Tests:
vtkDynamic2DLabelMapper (Tests)

Definition at line 67 of file vtkDynamic2DLabelMapper.h.


Member Typedef Documentation

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

Reimplemented from vtkLabeledDataMapper.

Definition at line 74 of file vtkDynamic2DLabelMapper.h.


Constructor & Destructor Documentation


Member Function Documentation

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

Reimplemented from vtkLabeledDataMapper.

static int vtkDynamic2DLabelMapper::IsTypeOf ( const char *  type) [static]

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

Reimplemented from vtkLabeledDataMapper.

virtual int vtkDynamic2DLabelMapper::IsA ( const char *  type) [virtual]

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

Reimplemented from vtkLabeledDataMapper.

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

Reimplemented from vtkLabeledDataMapper.

virtual vtkObjectBase* vtkDynamic2DLabelMapper::NewInstanceInternal ( ) const [protected, virtual]

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

Reimplemented from vtkLabeledDataMapper.

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

Reimplemented from vtkLabeledDataMapper.

void vtkDynamic2DLabelMapper::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

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

Reimplemented from vtkLabeledDataMapper.

void vtkDynamic2DLabelMapper::SetPriorityArrayName ( const char *  name)

Set the points array name to use to give priority to labels. Defaults to "priority".

virtual void vtkDynamic2DLabelMapper::SetReversePriority ( bool  ) [virtual]

Whether to reverse the priority order (i.e. low values have high priority). Default is off.

virtual bool vtkDynamic2DLabelMapper::GetReversePriority ( ) [virtual]

Whether to reverse the priority order (i.e. low values have high priority). Default is off.

virtual void vtkDynamic2DLabelMapper::ReversePriorityOn ( ) [virtual]

Whether to reverse the priority order (i.e. low values have high priority). Default is off.

virtual void vtkDynamic2DLabelMapper::ReversePriorityOff ( ) [virtual]

Whether to reverse the priority order (i.e. low values have high priority). Default is off.

Set the label height padding as a percentage. The percentage is a percentage of your label height. Default is 50%.

Set the label height padding as a percentage. The percentage is a percentage of your label height. Default is 50%.

Set the label width padding as a percentage. The percentage is a percentage of your label ^height^ (yes, not a typo). Default is 50%.

Set the label width padding as a percentage. The percentage is a percentage of your label ^height^ (yes, not a typo). Default is 50%.

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

Draw non-overlapping labels to the screen.

Reimplemented from vtkLabeledDataMapper.

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

Draw non-overlapping labels to the screen.

Reimplemented from vtkLabeledDataMapper.

Calculate the current zoom scale of the viewport.


Member Data Documentation

Definition at line 117 of file vtkDynamic2DLabelMapper.h.

Definition at line 118 of file vtkDynamic2DLabelMapper.h.

Definition at line 119 of file vtkDynamic2DLabelMapper.h.

Definition at line 120 of file vtkDynamic2DLabelMapper.h.

Definition at line 121 of file vtkDynamic2DLabelMapper.h.

Definition at line 122 of file vtkDynamic2DLabelMapper.h.

Definition at line 124 of file vtkDynamic2DLabelMapper.h.


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