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 -------------------------------------------------------------------------*/
32 #ifndef vtkRenderedTreeAreaRepresentation_h
33 #define vtkRenderedTreeAreaRepresentation_h
34 
35 #include "vtkViewsInfovisModule.h" // For export macro
37 
38 class vtkActor;
39 class vtkActor2D;
40 class vtkAreaLayout;
43 class vtkEdgeCenters;
47 class vtkPolyData;
49 class vtkPolyDataMapper;
50 class vtkScalarBarWidget;
51 class vtkTextProperty;
54 class vtkVertexDegree;
56 
57 class VTKVIEWSINFOVIS_EXPORT vtkRenderedTreeAreaRepresentation : public vtkRenderedRepresentation
58 {
59 public:
62  void PrintSelf(ostream& os, vtkIndent indent);
63 
70  virtual void SetLabelRenderMode(int mode);
71 
73 
76  virtual void SetAreaLabelArrayName(const char* name);
77  virtual const char* GetAreaLabelArrayName();
79 
81 
84  virtual void SetAreaSizeArrayName(const char* name);
85  virtual const char* GetAreaSizeArrayName();
87 
89 
93  virtual void SetAreaLabelPriorityArrayName(const char* name);
94  virtual const char* GetAreaLabelPriorityArrayName();
96 
98 
101  virtual void SetGraphEdgeLabelArrayName(const char* name)
102  { this->SetGraphEdgeLabelArrayName(name, 0); }
103  virtual void SetGraphEdgeLabelArrayName(const char* name, int idx);
104  virtual const char* GetGraphEdgeLabelArrayName()
105  { return this->GetGraphEdgeLabelArrayName(0); }
106  virtual const char* GetGraphEdgeLabelArrayName(int idx);
108 
110 
114  { this->SetGraphEdgeLabelTextProperty(tp, 0); }
115  virtual void SetGraphEdgeLabelTextProperty(vtkTextProperty* tp, int idx);
117  { return this->GetGraphEdgeLabelTextProperty(0); }
120 
122 
126  vtkSetStringMacro(AreaHoverArrayName);
127  vtkGetStringMacro(AreaHoverArrayName);
129 
131 
134  virtual void SetAreaLabelVisibility(bool vis);
135  virtual bool GetAreaLabelVisibility();
136  vtkBooleanMacro(AreaLabelVisibility, bool);
138 
140 
146 
148 
151  virtual void SetGraphEdgeLabelVisibility(bool vis)
152  { this->SetGraphEdgeLabelVisibility(vis, 0); }
153  virtual void SetGraphEdgeLabelVisibility(bool vis, int idx);
155  { return this->GetGraphEdgeLabelVisibility(0); }
156  virtual bool GetGraphEdgeLabelVisibility(int idx);
157  vtkBooleanMacro(GraphEdgeLabelVisibility, bool);
159 
161 
164  void SetAreaColorArrayName(const char* name);
165  const char* GetAreaColorArrayName();
167 
169 
172  virtual void SetColorAreasByArray(bool vis);
173  virtual bool GetColorAreasByArray();
174  vtkBooleanMacro(ColorAreasByArray, bool);
176 
178 
181  virtual void SetGraphEdgeColorArrayName(const char* name)
182  { this->SetGraphEdgeColorArrayName(name, 0); }
183  virtual void SetGraphEdgeColorArrayName(const char* name, int idx);
184  virtual const char* GetGraphEdgeColorArrayName()
185  { return this->GetGraphEdgeColorArrayName(0); }
186  virtual const char* GetGraphEdgeColorArrayName(int idx);
188 
193  { this->SetGraphEdgeColorToSplineFraction(0); }
194  virtual void SetGraphEdgeColorToSplineFraction(int idx);
195 
197 
200  virtual void SetColorGraphEdgesByArray(bool vis)
201  { this->SetColorGraphEdgesByArray(vis, 0); }
202  virtual void SetColorGraphEdgesByArray(bool vis, int idx);
204  { return this->GetColorGraphEdgesByArray(0); }
205  virtual bool GetColorGraphEdgesByArray(int idx);
206  vtkBooleanMacro(ColorGraphEdgesByArray, bool);
208 
210 
214  virtual void SetGraphHoverArrayName(const char* name)
215  { this->SetGraphHoverArrayName(name, 0); }
216  virtual void SetGraphHoverArrayName(const char* name, int idx);
217  virtual const char* GetGraphHoverArrayName()
218  { return this->GetGraphHoverArrayName(0); }
219  virtual const char* GetGraphHoverArrayName(int idx);
221 
223 
226  virtual void SetShrinkPercentage(double value);
227  virtual double GetShrinkPercentage();
229 
231 
234  virtual void SetGraphBundlingStrength(double strength)
235  { this->SetGraphBundlingStrength(strength, 0); }
236  virtual void SetGraphBundlingStrength(double strength, int idx);
237  virtual double GetGraphBundlingStrength()
238  { return this->GetGraphBundlingStrength(0); }
239  virtual double GetGraphBundlingStrength(int idx);
241 
243 
249  virtual void SetGraphSplineType(int type, int idx);
250  virtual int GetGraphSplineType(int idx);
252 
254 
260 
262 
267  virtual void SetAreaToPolyData(vtkPolyDataAlgorithm* areaToPoly);
268  vtkGetObjectMacro(AreaToPolyData, vtkPolyDataAlgorithm);
270 
272 
275  vtkSetMacro(UseRectangularCoordinates, bool);
276  vtkGetMacro(UseRectangularCoordinates, bool);
277  vtkBooleanMacro(UseRectangularCoordinates, bool);
279 
281 
286  vtkGetObjectMacro(AreaLabelMapper, vtkLabeledDataMapper);
288 
292  virtual void ApplyViewTheme(vtkViewTheme* theme);
293 
295 
298  virtual void SetEdgeScalarBarVisibility(bool b);
301 
302 protected:
305 
307 
310  virtual bool AddToView(vtkView* view);
311  virtual bool RemoveFromView(vtkView* view);
313 
315 
317 
318  virtual int RequestData(
322 
323  virtual void PrepareForRendering(vtkRenderView* view);
324 
325  bool ValidIndex(int idx);
326 
327  void UpdateHoverHighlight(vtkView* view, int x, int y);
328 
330 
331  class Internals;
332  Internals* Implementation;
333 
351 
352  vtkSetStringMacro(AreaSizeArrayNameInternal);
353  vtkGetStringMacro(AreaSizeArrayNameInternal);
355  vtkSetStringMacro(AreaColorArrayNameInternal);
356  vtkGetStringMacro(AreaColorArrayNameInternal);
358  vtkSetStringMacro(AreaLabelArrayNameInternal);
359  vtkGetStringMacro(AreaLabelArrayNameInternal);
361  vtkSetStringMacro(AreaLabelPriorityArrayNameInternal);
362  vtkGetStringMacro(AreaLabelPriorityArrayNameInternal);
364  vtkSetStringMacro(GraphEdgeColorArrayNameInternal);
365  vtkGetStringMacro(GraphEdgeColorArrayNameInternal);
367  vtkGetStringMacro(AreaHoverTextInternal);
368  vtkSetStringMacro(AreaHoverTextInternal);
371 
373 
374 private:
376  void operator=(const vtkRenderedTreeAreaRepresentation&) VTK_DELETE_FUNCTION;
377 };
378 
379 #endif
380 
a actor that draws 2D data
Definition: vtkActor2D.h:46
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
abstract superclass for all area layout strategies
layout a vtkTree into a tree map
Definition: vtkAreaLayout.h:47
Convert a selection from one type to another.
generate points at center of edges
extract a list of cells from a polydata
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
draw text labels at dataset points
build a label hierarchy for a graph or point set.
Superclass for algorithms that produce only polydata as output.
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
A view containing a renderer.
Definition: vtkRenderView.h:62
vtkSmartPointer< vtkVertexDegree > VertexDegree
virtual void SetShrinkPercentage(double value)
Set the region shrink percentage between 0.0 and 1.0.
virtual void SetEdgeScalarBarVisibility(bool b)
Visibility of scalar bar actor for edges.
virtual void SetAreaSizeArrayName(const char *name)
The array to use for area sizes.
vtkSmartPointer< vtkScalarBarWidget > EdgeScalarBar
virtual void SetAreaLabelVisibility(bool vis)
Whether to show area labels.
virtual void SetColorGraphEdgesByArray(bool vis)
Whether to color edges.
virtual const char * GetAreaSizeArrayName()
void UpdateHoverHighlight(vtkView *view, int x, int y)
virtual void SetGraphHoverArrayName(const char *name, int idx)
vtkSmartPointer< vtkTreeLevelsFilter > TreeLevels
virtual void SetAreaLayoutStrategy(vtkAreaLayoutStrategy *strategy)
The layout strategy for producing spatial regions for the tree.
vtkSmartPointer< vtkWorldPointPicker > Picker
virtual const char * GetAreaLabelPriorityArrayName()
virtual vtkTextProperty * GetGraphEdgeLabelTextProperty()
virtual bool AddToView(vtkView *view)
Called by the view to add/remove this representation.
virtual void SetColorAreasByArray(bool vis)
Whether to color vertices.
virtual void SetAreaToPolyData(vtkPolyDataAlgorithm *areaToPoly)
The filter for converting areas to polydata.
virtual void SetLabelRenderMode(int mode)
Set the label render mode.
virtual void PrepareForRendering(vtkRenderView *view)
The view will call this method before every render.
virtual const char * GetGraphEdgeColorArrayName(int idx)
virtual void SetColorGraphEdgesByArray(bool vis, int idx)
virtual vtkTextProperty * GetAreaLabelTextProperty()
virtual void SetGraphEdgeLabelVisibility(bool vis)
Whether to show edge labels.
virtual void SetGraphBundlingStrength(double strength, int idx)
virtual void SetGraphHoverArrayName(const char *name)
The name of the array whose value appears when the mouse hovers over a graph edge.
virtual void SetGraphBundlingStrength(double strength)
Set the bundling strength.
virtual vtkTextProperty * GetGraphEdgeLabelTextProperty(int idx)
static vtkRenderedTreeAreaRepresentation * New()
virtual const char * GetAreaLabelArrayName()
virtual void SetAreaLabelPriorityArrayName(const char *name)
The array to use for area labeling priority.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual vtkAreaLayoutStrategy * GetAreaLayoutStrategy()
vtkSmartPointer< vtkTreeFieldAggregator > TreeAggregation
virtual double GetShrinkPercentage()
vtkSmartPointer< vtkPointSetToLabelHierarchy > AreaLabelHierarchy
vtkSmartPointer< vtkPolyDataMapper > HighlightMapper
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses should override this to connect inputs to the internal pipeline as necessary.
virtual void SetGraphEdgeColorArrayName(const char *name)
The array to use for coloring edges.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void SetGraphEdgeLabelTextProperty(vtkTextProperty *tp, int idx)
virtual vtkUnicodeString GetHoverTextInternal(vtkSelection *sel)
Subclasses may override this method to generate the hover text.
virtual int GetGraphSplineType(int idx)
virtual double GetGraphBundlingStrength(int idx)
virtual void SetGraphSplineType(int type, int idx)
Sets the spline type for the graph edges.
virtual void SetGraphEdgeLabelVisibility(bool vis, int idx)
virtual void SetGraphEdgeColorToSplineFraction()
Set the color to be the spline fraction.
virtual void ApplyViewTheme(vtkViewTheme *theme)
Apply the theme to this view.
virtual bool RemoveFromView(vtkView *view)
virtual const char * GetGraphHoverArrayName(int idx)
virtual void SetAreaLabelArrayName(const char *name)
The array to use for area labeling.
virtual const char * GetGraphEdgeLabelArrayName(int idx)
virtual void SetGraphEdgeLabelArrayName(const char *name, int idx)
virtual void SetAreaLabelTextProperty(vtkTextProperty *tp)
The text property for the area labels.
void SetAreaColorArrayName(const char *name)
The array to use for coloring vertices.
virtual bool GetGraphEdgeLabelVisibility(int idx)
virtual void SetGraphEdgeColorToSplineFraction(int idx)
virtual bool GetEdgeScalarBarVisibility()
vtkSmartPointer< vtkApplyColors > ApplyColors
virtual bool GetColorGraphEdgesByArray(int idx)
virtual void SetGraphEdgeLabelArrayName(const char *name)
The array to use for edge labeling.
virtual void SetAreaLabelMapper(vtkLabeledDataMapper *mapper)
The mapper for rendering labels on areas.
virtual void SetGraphEdgeLabelTextProperty(vtkTextProperty *tp)
The text property for the graph edge labels.
virtual vtkSelection * ConvertSelection(vtkView *view, vtkSelection *sel)
Convert the selection to a type appropriate for sharing with other representations through vtkAnnotat...
virtual void SetGraphEdgeColorArrayName(const char *name, int idx)
vtkSmartPointer< vtkPolyDataMapper > AreaMapper
2D widget for manipulating a scalar bar
A node in a selection tree.
Definition: vtkSelection.h:44
represent text properties.
aggregate field values from the leaves up the tree
adds level and leaf fields to a vtkTree
String class that stores Unicode text.
Adds an attribute array with the degree of each vertex.
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:49
The superclass for all views.
Definition: vtkView.h:61
find world x,y,z corresponding to display x,y,z
@ info
Definition: vtkX3D.h:376
@ mode
Definition: vtkX3D.h:247
@ value
Definition: vtkX3D.h:220
@ port
Definition: vtkX3D.h:447
@ type
Definition: vtkX3D.h:516
@ name
Definition: vtkX3D.h:219
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.