VTK
vtkRenderedTreeAreaRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRenderedTreeAreaRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
31 #ifndef vtkRenderedTreeAreaRepresentation_h
32 #define vtkRenderedTreeAreaRepresentation_h
33 
34 #include "vtkViewsInfovisModule.h" // For export macro
36 
37 class vtkActor;
38 class vtkActor2D;
39 class vtkAreaLayout;
42 class vtkEdgeCenters;
46 class vtkPolyData;
48 class vtkPolyDataMapper;
49 class vtkScalarBarWidget;
50 class vtkTextProperty;
53 class vtkVertexDegree;
55 
57 {
58 public:
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
66  virtual void SetLabelRenderMode(int mode);
67 
69 
70  virtual void SetAreaLabelArrayName(const char* name);
71  virtual const char* GetAreaLabelArrayName();
73 
75 
76  virtual void SetAreaSizeArrayName(const char* name);
77  virtual const char* GetAreaSizeArrayName();
79 
81 
83  virtual void SetAreaLabelPriorityArrayName(const char* name);
84  virtual const char* GetAreaLabelPriorityArrayName();
86 
88 
89  virtual void SetGraphEdgeLabelArrayName(const char* name)
90  { this->SetGraphEdgeLabelArrayName(name, 0); }
91  virtual void SetGraphEdgeLabelArrayName(const char* name, int idx);
92  virtual const char* GetGraphEdgeLabelArrayName()
93  { return this->GetGraphEdgeLabelArrayName(0); }
94  virtual const char* GetGraphEdgeLabelArrayName(int idx);
96 
98 
100  { this->SetGraphEdgeLabelTextProperty(tp, 0); }
101  virtual void SetGraphEdgeLabelTextProperty(vtkTextProperty* tp, int idx);
103  { return this->GetGraphEdgeLabelTextProperty(0); }
104  virtual vtkTextProperty* GetGraphEdgeLabelTextProperty(int idx);
106 
108 
110  vtkSetStringMacro(AreaHoverArrayName);
111  vtkGetStringMacro(AreaHoverArrayName);
113 
115 
116  virtual void SetAreaLabelVisibility(bool vis);
117  virtual bool GetAreaLabelVisibility();
118  vtkBooleanMacro(AreaLabelVisibility, bool);
120 
122 
123  virtual void SetAreaLabelTextProperty(vtkTextProperty* tp);
124  virtual vtkTextProperty* GetAreaLabelTextProperty();
126 
128 
129  virtual void SetGraphEdgeLabelVisibility(bool vis)
130  { this->SetGraphEdgeLabelVisibility(vis, 0); }
131  virtual void SetGraphEdgeLabelVisibility(bool vis, int idx);
133  { return this->GetGraphEdgeLabelVisibility(0); }
134  virtual bool GetGraphEdgeLabelVisibility(int idx);
135  vtkBooleanMacro(GraphEdgeLabelVisibility, bool);
137 
139 
140  void SetAreaColorArrayName(const char* name);
141  const char* GetAreaColorArrayName();
143 
145 
146  virtual void SetColorAreasByArray(bool vis);
147  virtual bool GetColorAreasByArray();
148  vtkBooleanMacro(ColorAreasByArray, bool);
150 
152 
153  virtual void SetGraphEdgeColorArrayName(const char* name)
154  { this->SetGraphEdgeColorArrayName(name, 0); }
155  virtual void SetGraphEdgeColorArrayName(const char* name, int idx);
156  virtual const char* GetGraphEdgeColorArrayName()
157  { return this->GetGraphEdgeColorArrayName(0); }
158  virtual const char* GetGraphEdgeColorArrayName(int idx);
160 
162 
164  { this->SetGraphEdgeColorToSplineFraction(0); }
165  virtual void SetGraphEdgeColorToSplineFraction(int idx);
167 
169 
170  virtual void SetColorGraphEdgesByArray(bool vis)
171  { this->SetColorGraphEdgesByArray(vis, 0); }
172  virtual void SetColorGraphEdgesByArray(bool vis, int idx);
174  { return this->GetColorGraphEdgesByArray(0); }
175  virtual bool GetColorGraphEdgesByArray(int idx);
176  vtkBooleanMacro(ColorGraphEdgesByArray, bool);
178 
180 
182  virtual void SetGraphHoverArrayName(const char* name)
183  { this->SetGraphHoverArrayName(name, 0); }
184  virtual void SetGraphHoverArrayName(const char* name, int idx);
185  virtual const char* GetGraphHoverArrayName()
186  { return this->GetGraphHoverArrayName(0); }
187  virtual const char* GetGraphHoverArrayName(int idx);
189 
191 
192  virtual void SetShrinkPercentage(double value);
193  virtual double GetShrinkPercentage();
195 
197 
198  virtual void SetGraphBundlingStrength(double strength)
199  { this->SetGraphBundlingStrength(strength, 0); }
200  virtual void SetGraphBundlingStrength(double strength, int idx);
201  virtual double GetGraphBundlingStrength()
202  { return this->GetGraphBundlingStrength(0); }
203  virtual double GetGraphBundlingStrength(int idx);
205 
207 
210  virtual void SetGraphSplineType(int type, int idx);
211  virtual int GetGraphSplineType(int idx);
213 
215 
216  virtual void SetAreaLayoutStrategy(vtkAreaLayoutStrategy* strategy);
217  virtual vtkAreaLayoutStrategy* GetAreaLayoutStrategy();
219 
221 
224  virtual void SetAreaToPolyData(vtkPolyDataAlgorithm* areaToPoly);
225  vtkGetObjectMacro(AreaToPolyData, vtkPolyDataAlgorithm);
227 
229 
230  vtkSetMacro(UseRectangularCoordinates, bool);
231  vtkGetMacro(UseRectangularCoordinates, bool);
232  vtkBooleanMacro(UseRectangularCoordinates, bool);
234 
236 
238  virtual void SetAreaLabelMapper(vtkLabeledDataMapper* mapper);
239  vtkGetObjectMacro(AreaLabelMapper, vtkLabeledDataMapper);
241 
243  virtual void ApplyViewTheme(vtkViewTheme* theme);
244 
246 
247  virtual void SetEdgeScalarBarVisibility(bool b);
248  virtual bool GetEdgeScalarBarVisibility();
250 
251 protected:
254 
256 
257  virtual bool AddToView(vtkView* view);
258  virtual bool RemoveFromView(vtkView* view);
260 
261  virtual vtkSelection* ConvertSelection(vtkView* view, vtkSelection* sel);
262 
264 
265  virtual int RequestData(
269 
270  virtual void PrepareForRendering(vtkRenderView* view);
271 
272  bool ValidIndex(int idx);
273 
274  void UpdateHoverHighlight(vtkView* view, int x, int y);
275 
277 
278  //BTX
279  class Internals;
280  Internals* Implementation;
281  //ETX
282 
283  //BTX
301  //ETX
302 
303  vtkSetStringMacro(AreaSizeArrayNameInternal);
304  vtkGetStringMacro(AreaSizeArrayNameInternal);
306  vtkSetStringMacro(AreaColorArrayNameInternal);
307  vtkGetStringMacro(AreaColorArrayNameInternal);
309  vtkSetStringMacro(AreaLabelArrayNameInternal);
310  vtkGetStringMacro(AreaLabelArrayNameInternal);
312  vtkSetStringMacro(AreaLabelPriorityArrayNameInternal);
313  vtkGetStringMacro(AreaLabelPriorityArrayNameInternal);
315  vtkSetStringMacro(GraphEdgeColorArrayNameInternal);
316  vtkGetStringMacro(GraphEdgeColorArrayNameInternal);
318  vtkGetStringMacro(AreaHoverTextInternal);
319  vtkSetStringMacro(AreaHoverTextInternal);
320  char* AreaHoverTextInternal;
322 
324 
325 private:
327  void operator=(const vtkRenderedTreeAreaRepresentation&); // Not implemented
328 };
329 
330 #endif
331 
virtual void ApplyViewTheme(vtkViewTheme *vtkNotUsed(theme))
virtual void SetGraphEdgeLabelTextProperty(vtkTextProperty *tp)
virtual vtkSelection * ConvertSelection(vtkView *view, vtkSelection *selection)
vtkSmartPointer< vtkWorldPointPicker > Picker
virtual void SetGraphHoverArrayName(const char *name)
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
vtkSmartPointer< vtkApplyColors > ApplyColors
vtkSmartPointer< vtkPolyDataMapper > HighlightMapper
Store vtkAlgorithm input/output information.
vtkSmartPointer< vtkTreeLevelsFilter > TreeLevels
abstract superclass for all area layout strategies
virtual void SetGraphEdgeLabelArrayName(const char *name)
a actor that draws 2D data
Definition: vtkActor2D.h:44
void PrintSelf(ostream &os, vtkIndent indent)
vtkSmartPointer< vtkScalarBarWidget > EdgeScalarBar
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
Adds an attribute array with the degree of each vertex.
vtkSmartPointer< vtkTreeFieldAggregator > TreeAggregation
virtual void SetLabelRenderMode(int)
virtual bool AddToView(vtkView *vtkNotUsed(view))
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
static vtkRenderedRepresentation * New()
draw text labels at dataset points
vtkSmartPointer< vtkPolyDataMapper > AreaMapper
generate points at center of edges
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:47
layout a vtkTree into a tree map
Definition: vtkAreaLayout.h:45
virtual int FillInputPortInformation(int port, vtkInformation *info)
Superclass for algorithms that produce only polydata as output.
The superclass for all views.
Definition: vtkView.h:62
virtual vtkTextProperty * GetGraphEdgeLabelTextProperty()
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual bool RemoveFromView(vtkView *vtkNotUsed(view))
virtual void PrepareForRendering(vtkRenderView *view)
virtual void SetGraphBundlingStrength(double strength)
represent text properties.
aggregate field values from the leaves up the tree
build a label hierarchy for a graph or point set.
virtual void SetGraphEdgeColorArrayName(const char *name)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
map vtkPolyData to graphics primitives
vtkSmartPointer< vtkVertexDegree > VertexDegree
A view containing a renderer.
Definition: vtkRenderView.h:63
adds level and leaf fields to a vtkTree
Store zero or more vtkInformation instances.
Convert a selection from one type to another.
vtkSmartPointer< vtkPointSetToLabelHierarchy > AreaLabelHierarchy
find world x,y,z corresponding to display x,y,z
virtual vtkUnicodeString GetHoverTextInternal(vtkSelection *)
#define VTKVIEWSINFOVIS_EXPORT
String class that stores Unicode text.
extract a list of cells from a polydata
2D widget for manipulating a scalar bar