VTK  9.4.20241221
vtkLabeledTreeMapDataMapper.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
28#ifndef vtkLabeledTreeMapDataMapper_h
29#define vtkLabeledTreeMapDataMapper_h
30
32#include "vtkRenderingLabelModule.h" // For export macro
33#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
34
35VTK_ABI_NAMESPACE_BEGIN
36class vtkTree;
37class vtkPoints;
38class vtkCoordinate;
39class vtkFloatArray;
40class vtkStringArray;
41class vtkIdList;
42
43class VTKRENDERINGLABEL_EXPORT VTK_MARSHALAUTO vtkLabeledTreeMapDataMapper
45{
46public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
52
55 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor) override;
56 void RenderOverlay(vtkViewport* viewport, vtkActor2D* actor) override;
58
63
67 virtual void SetRectanglesArrayName(const char* name);
68
70
75 vtkGetMacro(ClipTextMode, int);
76 vtkSetMacro(ClipTextMode, int);
78
80
83 vtkGetMacro(ChildMotion, int);
84 vtkSetMacro(ChildMotion, int);
86
88
91 vtkGetMacro(DynamicLevel, int);
92 vtkSetMacro(DynamicLevel, int);
94
99
101
104 void SetFontSizeRange(int maxSize, int minSize, int delta = 4);
105 void GetFontSizeRange(int range[3]);
107
109
114 void SetLevelRange(int startLevel, int endLevel);
115 void GetLevelRange(int range[2]);
117
118protected:
121 void LabelTree(vtkTree* tree, vtkFloatArray* boxInfo, vtkDataArray* numericData,
122 vtkStringArray* stringData, int activeComp, int numComps);
123 void GetVertexLabel(vtkIdType vertex, vtkDataArray* numericData, vtkStringArray* stringData,
124 int activeComp, int numComps, char* string, size_t stringSize);
127 int GetStringSize(char* string, int level);
128 // Returns 1 if the transformed box is off screen
129 int ConvertToDC(float* origBoxInfo, float* newBoxInfo);
130 // Returns 1 if the label will not fit in box - 2 if the text could
131 // not be placed due to other labels
133 char* string, int level, float* blimitsDC, float* textPosWC, vtkTextProperty** tprop);
134 int ApplyMasks(int level, float flimits[4], float blimits[4]);
141 double BoxTrans[2][2];
142 double WindowLimits[2][2];
143
144 float (*LabelMasks)[4];
145
156
157private:
159 void operator=(const vtkLabeledTreeMapDataMapper&) = delete;
160};
161
162VTK_ABI_NAMESPACE_END
163#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of float
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
draw text labels at dataset points
draw text labels on a tree map
static vtkLabeledTreeMapDataMapper * New()
int GetStringSize(char *string, int level)
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
virtual vtkTree * GetInputTree()
The input to this filter.
int ConvertToDC(float *origBoxInfo, float *newBoxInfo)
int AnalyseLabel(char *string, int level, float *blimitsDC, float *textPosWC, vtkTextProperty **tprop)
virtual void SetRectanglesArrayName(const char *name)
The name of the 4-tuple array used for.
void GetVertexLabel(vtkIdType vertex, vtkDataArray *numericData, vtkStringArray *stringData, int activeComp, int numComps, char *string, size_t stringSize)
int UpdateWindowInfo(vtkViewport *viewport)
void SetLevelRange(int startLevel, int endLevel)
The range of levels to attempt to label.
void SetFontSizeRange(int maxSize, int minSize, int delta=4)
The range of font sizes to use when rendering the labels.
void LabelTree(vtkTree *tree, vtkFloatArray *boxInfo, vtkDataArray *numericData, vtkStringArray *stringData, int activeComp, int numComps)
void GetFontSizeRange(int range[3])
The range of font sizes to use when rendering the labels.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RenderOpaqueGeometry(vtkViewport *viewport, vtkActor2D *actor) override
Draw the text to the screen at each input point.
void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor) override
Draw the text to the screen at each input point.
void GetLevelRange(int range[2])
The range of levels to attempt to label.
~vtkLabeledTreeMapDataMapper() override
int ApplyMasks(int level, float flimits[4], float blimits[4])
represent and manipulate 3D points
Definition vtkPoints.h:139
a vtkAbstractArray subclass for strings
represent text properties.
A rooted tree data structure.
Definition vtkTree.h:155
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkIdType
Definition vtkType.h:315
#define VTK_MARSHALAUTO