vtkDynamic2DLabelMapper Class Reference

#include <vtkDynamic2DLabelMapper.h>

Inheritance diagram for vtkDynamic2DLabelMapper:

Inheritance graph
[legend]
Collaboration diagram for vtkDynamic2DLabelMapper:

Collaboration graph
[legend]

List of all members.


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
Tests:
vtkDynamic2DLabelMapper (Tests)

Definition at line 63 of file vtkDynamic2DLabelMapper.h.

typedef vtkLabeledDataMapper Superclass
static vtkDynamic2DLabelMapperNew ()
static int IsTypeOf (const char *type)
static vtkDynamic2DLabelMapperSafeDownCast (vtkObject *o)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)

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

float * LabelWidth
float * LabelHeight
float * Cutoff
float ReferenceScale
float LabelHeightPadding
float LabelWidthPadding
bool ReversePriority

Member Typedef Documentation

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

Reimplemented from vtkLabeledDataMapper.

Definition at line 70 of file vtkDynamic2DLabelMapper.h.


Constructor & Destructor Documentation

vtkDynamic2DLabelMapper::vtkDynamic2DLabelMapper (  )  [protected]

vtkDynamic2DLabelMapper::~vtkDynamic2DLabelMapper (  )  [protected]


Member Function Documentation

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

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

Reimplemented from vtkLabeledDataMapper.

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

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.

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

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.

virtual void vtkDynamic2DLabelMapper::SetLabelHeightPadding ( float   )  [virtual]

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

virtual float vtkDynamic2DLabelMapper::GetLabelHeightPadding (  )  [virtual]

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

virtual void vtkDynamic2DLabelMapper::SetLabelWidthPadding ( float   )  [virtual]

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

virtual float vtkDynamic2DLabelMapper::GetLabelWidthPadding (  )  [virtual]

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.

double vtkDynamic2DLabelMapper::GetCurrentScale ( vtkViewport viewport  )  [protected]

Calculate the current zoom scale of the viewport.


Member Data Documentation

Definition at line 113 of file vtkDynamic2DLabelMapper.h.

Definition at line 114 of file vtkDynamic2DLabelMapper.h.

float* vtkDynamic2DLabelMapper::Cutoff [protected]

Definition at line 115 of file vtkDynamic2DLabelMapper.h.

Definition at line 116 of file vtkDynamic2DLabelMapper.h.

Definition at line 117 of file vtkDynamic2DLabelMapper.h.

Definition at line 118 of file vtkDynamic2DLabelMapper.h.

Definition at line 120 of file vtkDynamic2DLabelMapper.h.


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

Generated on Wed Jun 3 19:00:48 2009 for VTK by  doxygen 1.5.6