#include <vtkLabeledTreeMapDataMapper.h>
vtkLabeledTreeMapDataMapper is a mapper that renders text on a tree map. A tree map is a vtkTree with an associated 4-tuple array used for storing the boundary rectangle for each vertex in the tree. The user must specify the array name used for storing the rectangles.
The mapper iterates through the tree and attempts and renders a label inside the vertex's rectangle as long as the following conditions hold: 1. The vertex level is within the range of levels specified for labeling. 2. The label can fully fit inside its box. 3. The label does not overlap an ancestor's label.
Definition at line 55 of file vtkLabeledTreeMapDataMapper.h.
Public Types | |
typedef vtkLabeledDataMapper | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkTree * | GetInputTree () |
virtual void | SetRectanglesArrayName (const char *name) |
virtual void | ReleaseGraphicsResources (vtkWindow *) |
virtual void | RenderOpaqueGeometry (vtkViewport *viewport, vtkActor2D *actor) |
virtual void | RenderOverlay (vtkViewport *viewport, vtkActor2D *actor) |
virtual int | GetClipTextMode () |
virtual void | SetClipTextMode (int) |
virtual int | GetChildMotion () |
virtual void | SetChildMotion (int) |
virtual int | GetDynamicLevel () |
virtual void | SetDynamicLevel (int) |
void | SetFontSizeRange (int maxSize, int minSize, int delta=4) |
void | GetFontSizeRange (int range[3]) |
void | SetLevelRange (int startLevel, int endLevel) |
void | GetLevelRange (int range[2]) |
Static Public Member Functions | |
static vtkLabeledTreeMapDataMapper * | New () |
static int | IsTypeOf (const char *type) |
static vtkLabeledTreeMapDataMapper * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkLabeledTreeMapDataMapper () | |
~vtkLabeledTreeMapDataMapper () | |
void | LabelTree (vtkTree *tree, vtkFloatArray *boxInfo, vtkDataArray *numericData, vtkStringArray *stringData, int activeComp, int numComps) |
void | GetVertexLabel (vtkIdType vertex, vtkDataArray *numericData, vtkStringArray *stringData, int activeComp, int numComps, char *string) |
void | UpdateFontSizes () |
int | UpdateWindowInfo (vtkViewport *viewport) |
int | GetStringSize (char *string, int level) |
int | ConvertToDC (float *origBoxInfo, float *newBoxInfo) |
int | AnalyseLabel (char *string, int level, float *blimitsDC, float *textPosWC, vtkTextProperty **tprop) |
int | ApplyMasks (int level, float flimits[4], float blimits[4]) |
Protected Attributes | |
vtkViewport * | CurrentViewPort |
int * | FontHeights |
int ** | FontWidths |
int | MaxFontLevel |
int * | ChildrenCount |
int | MaxTreeLevels |
double | BoxTrans [2][2] |
double | WindowLimits [2][2] |
float(* | LabelMasks )[4] |
vtkIdList * | VertexList |
vtkPoints * | TextPoints |
vtkCoordinate * | VCoord |
int | ClipTextMode |
int | ChildMotion |
int | StartLevel |
int | EndLevel |
int | DynamicLevel |
vtkTextProperty * | VerticalLabelProperty |
vtkTextProperty ** | HLabelProperties |
Reimplemented from vtkLabeledDataMapper.
Definition at line 59 of file vtkLabeledTreeMapDataMapper.h.
vtkLabeledTreeMapDataMapper::vtkLabeledTreeMapDataMapper | ( | ) | [protected] |
vtkLabeledTreeMapDataMapper::~vtkLabeledTreeMapDataMapper | ( | ) | [protected] |
static vtkLabeledTreeMapDataMapper* vtkLabeledTreeMapDataMapper::New | ( | ) | [static] |
Instantiate object with %-#6.3g label format. By default, point ids are labeled.
Reimplemented from vtkLabeledDataMapper.
virtual const char* vtkLabeledTreeMapDataMapper::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkLabeledDataMapper.
static int vtkLabeledTreeMapDataMapper::IsTypeOf | ( | const char * | name | ) | [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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkLabeledDataMapper.
virtual int vtkLabeledTreeMapDataMapper::IsA | ( | const char * | name | ) | [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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkLabeledDataMapper.
static vtkLabeledTreeMapDataMapper* vtkLabeledTreeMapDataMapper::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkLabeledDataMapper.
void vtkLabeledTreeMapDataMapper::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 vtkLabeledDataMapper.
virtual void vtkLabeledTreeMapDataMapper::RenderOpaqueGeometry | ( | vtkViewport * | viewport, | |
vtkActor2D * | actor | |||
) | [virtual] |
Draw the text to the screen at each input point.
Reimplemented from vtkLabeledDataMapper.
virtual void vtkLabeledTreeMapDataMapper::RenderOverlay | ( | vtkViewport * | viewport, | |
vtkActor2D * | actor | |||
) | [virtual] |
Draw the text to the screen at each input point.
Reimplemented from vtkLabeledDataMapper.
virtual vtkTree* vtkLabeledTreeMapDataMapper::GetInputTree | ( | ) | [virtual] |
The input to this filter.
virtual void vtkLabeledTreeMapDataMapper::SetRectanglesArrayName | ( | const char * | name | ) | [virtual] |
The name of the 4-tuple array used for
virtual int vtkLabeledTreeMapDataMapper::GetClipTextMode | ( | ) | [virtual] |
Indicates if the label can be displayed clipped by the Window mode = 0 - ok to clip labels 1 - auto center labels w/r to the area of the vertex's clipped region
virtual void vtkLabeledTreeMapDataMapper::SetClipTextMode | ( | int | ) | [virtual] |
Indicates if the label can be displayed clipped by the Window mode = 0 - ok to clip labels 1 - auto center labels w/r to the area of the vertex's clipped region
virtual int vtkLabeledTreeMapDataMapper::GetChildMotion | ( | ) | [virtual] |
Indicates if the label can be moved by its ancestors
virtual void vtkLabeledTreeMapDataMapper::SetChildMotion | ( | int | ) | [virtual] |
Indicates if the label can be moved by its ancestors
virtual int vtkLabeledTreeMapDataMapper::GetDynamicLevel | ( | ) | [virtual] |
Indicates at which level labeling should be dynamic
virtual void vtkLabeledTreeMapDataMapper::SetDynamicLevel | ( | int | ) | [virtual] |
Indicates at which level labeling should be dynamic
virtual void vtkLabeledTreeMapDataMapper::ReleaseGraphicsResources | ( | vtkWindow * | ) | [virtual] |
Release any graphics resources that are being consumed by this actor.
Reimplemented from vtkLabeledDataMapper.
void vtkLabeledTreeMapDataMapper::SetFontSizeRange | ( | int | maxSize, | |
int | minSize, | |||
int | delta = 4 | |||
) |
The range of font sizes to use when rendering the labels.
void vtkLabeledTreeMapDataMapper::GetFontSizeRange | ( | int | range[3] | ) |
The range of font sizes to use when rendering the labels.
void vtkLabeledTreeMapDataMapper::SetLevelRange | ( | int | startLevel, | |
int | endLevel | |||
) |
The range of levels to attempt to label. The level of a vertex is the length of the path to the root (the root has level 0).
void vtkLabeledTreeMapDataMapper::GetLevelRange | ( | int | range[2] | ) |
The range of levels to attempt to label. The level of a vertex is the length of the path to the root (the root has level 0).
void vtkLabeledTreeMapDataMapper::LabelTree | ( | vtkTree * | tree, | |
vtkFloatArray * | boxInfo, | |||
vtkDataArray * | numericData, | |||
vtkStringArray * | stringData, | |||
int | activeComp, | |||
int | numComps | |||
) | [protected] |
void vtkLabeledTreeMapDataMapper::GetVertexLabel | ( | vtkIdType | vertex, | |
vtkDataArray * | numericData, | |||
vtkStringArray * | stringData, | |||
int | activeComp, | |||
int | numComps, | |||
char * | string | |||
) | [protected] |
void vtkLabeledTreeMapDataMapper::UpdateFontSizes | ( | ) | [protected] |
int vtkLabeledTreeMapDataMapper::UpdateWindowInfo | ( | vtkViewport * | viewport | ) | [protected] |
int vtkLabeledTreeMapDataMapper::GetStringSize | ( | char * | string, | |
int | level | |||
) | [protected] |
int vtkLabeledTreeMapDataMapper::ConvertToDC | ( | float * | origBoxInfo, | |
float * | newBoxInfo | |||
) | [protected] |
int vtkLabeledTreeMapDataMapper::AnalyseLabel | ( | char * | string, | |
int | level, | |||
float * | blimitsDC, | |||
float * | textPosWC, | |||
vtkTextProperty ** | tprop | |||
) | [protected] |
int vtkLabeledTreeMapDataMapper::ApplyMasks | ( | int | level, | |
float | flimits[4], | |||
float | blimits[4] | |||
) | [protected] |
vtkViewport* vtkLabeledTreeMapDataMapper::CurrentViewPort [protected] |
Definition at line 130 of file vtkLabeledTreeMapDataMapper.h.
int* vtkLabeledTreeMapDataMapper::FontHeights [protected] |
Definition at line 131 of file vtkLabeledTreeMapDataMapper.h.
int** vtkLabeledTreeMapDataMapper::FontWidths [protected] |
Definition at line 132 of file vtkLabeledTreeMapDataMapper.h.
int vtkLabeledTreeMapDataMapper::MaxFontLevel [protected] |
Definition at line 133 of file vtkLabeledTreeMapDataMapper.h.
int* vtkLabeledTreeMapDataMapper::ChildrenCount [protected] |
Definition at line 134 of file vtkLabeledTreeMapDataMapper.h.
int vtkLabeledTreeMapDataMapper::MaxTreeLevels [protected] |
Definition at line 135 of file vtkLabeledTreeMapDataMapper.h.
double vtkLabeledTreeMapDataMapper::BoxTrans[2][2] [protected] |
Definition at line 136 of file vtkLabeledTreeMapDataMapper.h.
double vtkLabeledTreeMapDataMapper::WindowLimits[2][2] [protected] |
Definition at line 137 of file vtkLabeledTreeMapDataMapper.h.
float(* vtkLabeledTreeMapDataMapper::LabelMasks)[4] [protected] |
Definition at line 139 of file vtkLabeledTreeMapDataMapper.h.
vtkIdList* vtkLabeledTreeMapDataMapper::VertexList [protected] |
Definition at line 141 of file vtkLabeledTreeMapDataMapper.h.
vtkPoints* vtkLabeledTreeMapDataMapper::TextPoints [protected] |
Definition at line 142 of file vtkLabeledTreeMapDataMapper.h.
vtkCoordinate* vtkLabeledTreeMapDataMapper::VCoord [protected] |
Definition at line 143 of file vtkLabeledTreeMapDataMapper.h.
int vtkLabeledTreeMapDataMapper::ClipTextMode [protected] |
Definition at line 144 of file vtkLabeledTreeMapDataMapper.h.
int vtkLabeledTreeMapDataMapper::ChildMotion [protected] |
Definition at line 145 of file vtkLabeledTreeMapDataMapper.h.
int vtkLabeledTreeMapDataMapper::StartLevel [protected] |
Definition at line 146 of file vtkLabeledTreeMapDataMapper.h.
int vtkLabeledTreeMapDataMapper::EndLevel [protected] |
Definition at line 147 of file vtkLabeledTreeMapDataMapper.h.
int vtkLabeledTreeMapDataMapper::DynamicLevel [protected] |
Definition at line 148 of file vtkLabeledTreeMapDataMapper.h.
Definition at line 149 of file vtkLabeledTreeMapDataMapper.h.
vtkTextProperty** vtkLabeledTreeMapDataMapper::HLabelProperties [protected] |
Definition at line 150 of file vtkLabeledTreeMapDataMapper.h.