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 
35 
36 class vtkActor;
37 class vtkActor2D;
38 class vtkAreaLayout;
41 class vtkEdgeCenters;
45 class vtkPolyData;
47 class vtkPolyDataMapper;
48 class vtkScalarBarWidget;
49 class vtkTextProperty;
52 class vtkVertexDegree;
54 
56 {
57 public:
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
65  virtual void SetLabelRenderMode(int mode);
66 
68 
69  virtual void SetAreaLabelArrayName(const char* name);
70  virtual const char* GetAreaLabelArrayName();
72 
74 
75  virtual void SetAreaSizeArrayName(const char* name);
76  virtual const char* GetAreaSizeArrayName();
78 
80 
82  virtual void SetAreaLabelPriorityArrayName(const char* name);
83  virtual const char* GetAreaLabelPriorityArrayName();
85 
87 
88  virtual void SetGraphEdgeLabelArrayName(const char* name)
89  { this->SetGraphEdgeLabelArrayName(name, 0); }
90  virtual void SetGraphEdgeLabelArrayName(const char* name, int idx);
91  virtual const char* GetGraphEdgeLabelArrayName()
92  { return this->GetGraphEdgeLabelArrayName(0); }
93  virtual const char* GetGraphEdgeLabelArrayName(int idx);
95 
97 
99  { this->SetGraphEdgeLabelTextProperty(tp, 0); }
100  virtual void SetGraphEdgeLabelTextProperty(vtkTextProperty* tp, int idx);
102  { return this->GetGraphEdgeLabelTextProperty(0); }
103  virtual vtkTextProperty* GetGraphEdgeLabelTextProperty(int idx);
105 
107 
109  vtkSetStringMacro(AreaHoverArrayName);
110  vtkGetStringMacro(AreaHoverArrayName);
112 
114 
115  virtual void SetAreaLabelVisibility(bool vis);
116  virtual bool GetAreaLabelVisibility();
117  vtkBooleanMacro(AreaLabelVisibility, bool);
119 
121 
122  virtual void SetAreaLabelTextProperty(vtkTextProperty* tp);
123  virtual vtkTextProperty* GetAreaLabelTextProperty();
125 
127 
128  virtual void SetGraphEdgeLabelVisibility(bool vis)
129  { this->SetGraphEdgeLabelVisibility(vis, 0); }
130  virtual void SetGraphEdgeLabelVisibility(bool vis, int idx);
132  { return this->GetGraphEdgeLabelVisibility(0); }
133  virtual bool GetGraphEdgeLabelVisibility(int idx);
134  vtkBooleanMacro(GraphEdgeLabelVisibility, bool);
136 
138 
139  void SetAreaColorArrayName(const char* name);
140  const char* GetAreaColorArrayName();
142 
144 
145  virtual void SetColorAreasByArray(bool vis);
146  virtual bool GetColorAreasByArray();
147  vtkBooleanMacro(ColorAreasByArray, bool);
149 
151 
152  virtual void SetGraphEdgeColorArrayName(const char* name)
153  { this->SetGraphEdgeColorArrayName(name, 0); }
154  virtual void SetGraphEdgeColorArrayName(const char* name, int idx);
155  virtual const char* GetGraphEdgeColorArrayName()
156  { return this->GetGraphEdgeColorArrayName(0); }
157  virtual const char* GetGraphEdgeColorArrayName(int idx);
159 
161 
163  { this->SetGraphEdgeColorToSplineFraction(0); }
164  virtual void SetGraphEdgeColorToSplineFraction(int idx);
166 
168 
169  virtual void SetColorGraphEdgesByArray(bool vis)
170  { this->SetColorGraphEdgesByArray(vis, 0); }
171  virtual void SetColorGraphEdgesByArray(bool vis, int idx);
173  { return this->GetColorGraphEdgesByArray(0); }
174  virtual bool GetColorGraphEdgesByArray(int idx);
175  vtkBooleanMacro(ColorGraphEdgesByArray, bool);
177 
179 
181  virtual void SetGraphHoverArrayName(const char* name)
182  { this->SetGraphHoverArrayName(name, 0); }
183  virtual void SetGraphHoverArrayName(const char* name, int idx);
184  virtual const char* GetGraphHoverArrayName()
185  { return this->GetGraphHoverArrayName(0); }
186  virtual const char* GetGraphHoverArrayName(int idx);
188 
190 
191  virtual void SetShrinkPercentage(double value);
192  virtual double GetShrinkPercentage();
194 
196 
197  virtual void SetGraphBundlingStrength(double strength)
198  { this->SetGraphBundlingStrength(strength, 0); }
199  virtual void SetGraphBundlingStrength(double strength, int idx);
200  virtual double GetGraphBundlingStrength()
201  { return this->GetGraphBundlingStrength(0); }
202  virtual double GetGraphBundlingStrength(int idx);
204 
206 
209  virtual void SetGraphSplineType(int type, int idx);
210  virtual int GetGraphSplineType(int idx);
212 
214 
215  virtual void SetAreaLayoutStrategy(vtkAreaLayoutStrategy* strategy);
216  virtual vtkAreaLayoutStrategy* GetAreaLayoutStrategy();
218 
220 
223  virtual void SetAreaToPolyData(vtkPolyDataAlgorithm* areaToPoly);
224  vtkGetObjectMacro(AreaToPolyData, vtkPolyDataAlgorithm);
226 
228 
229  vtkSetMacro(UseRectangularCoordinates, bool);
230  vtkGetMacro(UseRectangularCoordinates, bool);
231  vtkBooleanMacro(UseRectangularCoordinates, bool);
233 
235 
237  virtual void SetAreaLabelMapper(vtkLabeledDataMapper* mapper);
238  vtkGetObjectMacro(AreaLabelMapper, vtkLabeledDataMapper);
240 
242  virtual void ApplyViewTheme(vtkViewTheme* theme);
243 
245 
246  virtual void SetEdgeScalarBarVisibility(bool b);
247  virtual bool GetEdgeScalarBarVisibility();
249 
250 protected:
253 
255 
256  virtual bool AddToView(vtkView* view);
257  virtual bool RemoveFromView(vtkView* view);
259 
260  virtual vtkSelection* ConvertSelection(vtkView* view, vtkSelection* sel);
261 
263 
264  virtual int RequestData(
268 
269  virtual void PrepareForRendering(vtkRenderView* view);
270 
271  bool ValidIndex(int idx);
272 
273  void UpdateHoverHighlight(vtkView* view, int x, int y);
274 
276 
277  //BTX
278  class Internals;
279  Internals* Implementation;
280  //ETX
281 
282  //BTX
300  //ETX
301 
302  vtkSetStringMacro(AreaSizeArrayNameInternal);
303  vtkGetStringMacro(AreaSizeArrayNameInternal);
305  vtkSetStringMacro(AreaColorArrayNameInternal);
306  vtkGetStringMacro(AreaColorArrayNameInternal);
308  vtkSetStringMacro(AreaLabelArrayNameInternal);
309  vtkGetStringMacro(AreaLabelArrayNameInternal);
311  vtkSetStringMacro(AreaLabelPriorityArrayNameInternal);
312  vtkGetStringMacro(AreaLabelPriorityArrayNameInternal);
314  vtkSetStringMacro(GraphEdgeColorArrayNameInternal);
315  vtkGetStringMacro(GraphEdgeColorArrayNameInternal);
317  vtkGetStringMacro(AreaHoverTextInternal);
318  vtkSetStringMacro(AreaHoverTextInternal);
319  char* AreaHoverTextInternal;
321 
323 
324 private:
326  void operator=(const vtkRenderedTreeAreaRepresentation&); // Not implemented
327 };
328 
329 #endif
330