VTK  9.3.20240418
vtkTreeAreaView.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
22 #ifndef vtkTreeAreaView_h
23 #define vtkTreeAreaView_h
24 
25 #include "vtkRenderView.h"
26 #include "vtkViewsInfovisModule.h" // For export macro
27 
28 VTK_ABI_NAMESPACE_BEGIN
30 class vtkGraph;
34 class vtkTree;
35 
36 class VTKVIEWSINFOVIS_EXPORT vtkTreeAreaView : public vtkRenderView
37 {
38 public:
39  static vtkTreeAreaView* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
52 
54 
57  void SetAreaLabelArrayName(const char* name);
58  const char* GetAreaLabelArrayName();
60 
62 
65  void SetAreaSizeArrayName(const char* name);
66  const char* GetAreaSizeArrayName();
68 
70 
74  void SetLabelPriorityArrayName(const char* name);
77 
79 
82  void SetEdgeLabelArrayName(const char* name);
83  const char* GetEdgeLabelArrayName();
85 
87 
92  void SetAreaHoverArrayName(const char* name);
93  const char* GetAreaHoverArrayName();
95 
97 
100  void SetAreaLabelVisibility(bool vis);
102  vtkBooleanMacro(AreaLabelVisibility, bool);
104 
106 
109  void SetEdgeLabelVisibility(bool vis);
111  vtkBooleanMacro(EdgeLabelVisibility, bool);
113 
115 
118  void SetAreaColorArrayName(const char* name);
119  const char* GetAreaColorArrayName();
121 
123 
126  void SetColorAreas(bool vis);
128  vtkBooleanMacro(ColorAreas, bool);
130 
132 
135  void SetEdgeColorArrayName(const char* name);
136  const char* GetEdgeColorArrayName();
138 
143 
145 
151 
153 
156  void SetColorEdges(bool vis);
158  vtkBooleanMacro(ColorEdges, bool);
160 
162 
165  void SetBundlingStrength(double strength);
168 
170 
173  virtual void SetAreaLabelFontSize(int size);
174  virtual int GetAreaLabelFontSize();
176 
178 
181  virtual void SetEdgeLabelFontSize(int size);
182  virtual int GetEdgeLabelFontSize();
184 
186 
189  virtual void SetLayoutStrategy(vtkAreaLayoutStrategy* strategy);
192 
194 
197  virtual void SetUseRectangularCoordinates(bool rect);
199  vtkBooleanMacro(UseRectangularCoordinates, bool);
201 
203 
206  virtual void SetEdgeScalarBarVisibility(bool b);
209 
210 protected:
212  ~vtkTreeAreaView() override;
213 
215 
220  virtual void SetAreaToPolyData(vtkPolyDataAlgorithm* areaToPoly);
223 
225 
232 
234 
241 
242 private:
243  vtkTreeAreaView(const vtkTreeAreaView&) = delete;
244  void operator=(const vtkTreeAreaView&) = delete;
245 };
246 
247 VTK_ABI_NAMESPACE_END
248 #endif
Proxy object to connect input/output ports.
abstract superclass for all area layout strategies
The superclass for all representations.
Base class for graph data types.
Definition: vtkGraph.h:340
a simple class to control print indentation
Definition: vtkIndent.h:108
draw text labels at dataset points
Superclass for algorithms that produce only polydata as output.
A view containing a renderer.
Definition: vtkRenderView.h:69
Accepts a graph and a hierarchy - currently a tree - and provides a hierarchy-aware display.
virtual vtkRenderedTreeAreaRepresentation * GetTreeAreaRepresentation()
Overrides behavior in vtkView to create a vtkRenderedGraphRepresentation by default.
bool GetEdgeLabelVisibility()
Whether to show edge labels.
const char * GetAreaColorArrayName()
The array to use for coloring vertices.
virtual void SetEdgeScalarBarVisibility(bool b)
Visibility of scalar bar actor for edges.
double GetBundlingStrength()
Set the bundling strength.
void SetColorEdges(bool vis)
Whether to color edges.
virtual vtkLabeledDataMapper * GetAreaLabelMapper()
The mapper for rendering labels on areas.
vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn) override
Overrides behavior in vtkView to create a vtkRenderedGraphRepresentation by default.
void SetAreaSizeArrayName(const char *name)
The array to use for area sizes.
virtual void SetLayoutStrategy(vtkAreaLayoutStrategy *strategy)
The layout strategy for producing spatial regions for the tree.
double GetShrinkPercentage()
Set the region shrink percentage between 0.0 and 1.0.
virtual void SetAreaLabelFontSize(int size)
The size of the font used for area labeling.
virtual vtkPolyDataAlgorithm * GetAreaToPolyData()
The filter for converting areas to polydata.
virtual void SetAreaToPolyData(vtkPolyDataAlgorithm *areaToPoly)
The filter for converting areas to polydata.
~vtkTreeAreaView() override
virtual bool GetUseRectangularCoordinates()
Whether the area represents radial or rectangular coordinates.
void SetEdgeLabelVisibility(bool vis)
Whether to show edge labels.
vtkDataRepresentation * SetTreeFromInputConnection(vtkAlgorithmOutput *conn)
Set the tree and graph representations to the appropriate input ports.
void SetShrinkPercentage(double value)
Set the region shrink percentage between 0.0 and 1.0.
void SetBundlingStrength(double strength)
Set the bundling strength.
void SetColorAreas(bool vis)
Whether to color vertices.
const char * GetAreaHoverArrayName()
The name of the array whose value appears when the mouse hovers over a rectangle in the treemap.
const char * GetLabelPriorityArrayName()
The array to use for area labeling priority.
bool GetAreaLabelVisibility()
Whether to show area labels.
void SetAreaLabelArrayName(const char *name)
The array to use for area labeling.
bool GetColorEdges()
Whether to color edges.
void SetEdgeLabelArrayName(const char *name)
The array to use for edge labeling.
void SetEdgeColorToSplineFraction()
Set the color to be the spline fraction.
virtual int GetEdgeLabelFontSize()
The size of the font used for edge labeling.
void SetEdgeColorArrayName(const char *name)
The array to use for coloring edges.
virtual void SetUseRectangularCoordinates(bool rect)
Whether the area represents radial or rectangular coordinates.
virtual int GetAreaLabelFontSize()
The size of the font used for area labeling.
vtkDataRepresentation * SetGraphFromInput(vtkGraph *input)
Set the tree and graph representations to the appropriate input ports.
void SetAreaColorArrayName(const char *name)
The array to use for coloring vertices.
virtual void SetAreaLabelMapper(vtkLabeledDataMapper *mapper)
The mapper for rendering labels on areas.
const char * GetEdgeLabelArrayName()
The array to use for edge labeling.
vtkDataRepresentation * SetGraphFromInputConnection(vtkAlgorithmOutput *conn)
Set the tree and graph representations to the appropriate input ports.
void SetAreaHoverArrayName(const char *name)
The name of the array whose value appears when the mouse hovers over a rectangle in the treemap.
void SetLabelPriorityArrayName(const char *name)
The array to use for area labeling priority.
static vtkTreeAreaView * New()
const char * GetEdgeColorArrayName()
The array to use for coloring edges.
virtual void SetEdgeLabelFontSize(int size)
The size of the font used for edge labeling.
bool GetColorAreas()
Whether to color vertices.
const char * GetAreaLabelArrayName()
The array to use for area labeling.
void SetAreaLabelVisibility(bool vis)
Whether to show area labels.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataRepresentation * SetTreeFromInput(vtkTree *input)
Set the tree and graph representations to the appropriate input ports.
virtual bool GetEdgeScalarBarVisibility()
Visibility of scalar bar actor for edges.
virtual vtkAreaLayoutStrategy * GetLayoutStrategy()
The layout strategy for producing spatial regions for the tree.
const char * GetAreaSizeArrayName()
The array to use for area sizes.
A rooted tree data structure.
Definition: vtkTree.h:145
@ value
Definition: vtkX3D.h:220
@ name
Definition: vtkX3D.h:219
@ size
Definition: vtkX3D.h:253