VTK  9.2.6
vtkRenderedHierarchyRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRenderedHierarchyRepresentation.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 -------------------------------------------------------------------------*/
29 #ifndef vtkRenderedHierarchyRepresentation_h
30 #define vtkRenderedHierarchyRepresentation_h
31 
33 #include "vtkViewsInfovisModule.h" // For export macro
34 
35 class VTKVIEWSINFOVIS_EXPORT vtkRenderedHierarchyRepresentation
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  virtual void SetGraphEdgeLabelArrayName(const char* name)
48  {
49  this->SetGraphEdgeLabelArrayName(name, 0);
50  }
51  virtual void SetGraphEdgeLabelArrayName(const char* name, int idx);
52  virtual const char* GetGraphEdgeLabelArrayName() { return this->GetGraphEdgeLabelArrayName(0); }
53  virtual const char* GetGraphEdgeLabelArrayName(int idx);
55 
56  virtual void SetGraphEdgeLabelVisibility(bool vis) { this->SetGraphEdgeLabelVisibility(vis, 0); }
57  virtual void SetGraphEdgeLabelVisibility(bool vis, int idx);
58  virtual bool GetGraphEdgeLabelVisibility() { return this->GetGraphEdgeLabelVisibility(0); }
59  virtual bool GetGraphEdgeLabelVisibility(int idx);
60  vtkBooleanMacro(GraphEdgeLabelVisibility, bool);
61 
62  virtual void SetGraphEdgeColorArrayName(const char* name)
63  {
64  this->SetGraphEdgeColorArrayName(name, 0);
65  }
66  virtual void SetGraphEdgeColorArrayName(const char* name, int idx);
67  virtual const char* GetGraphEdgeColorArrayName() { return this->GetGraphEdgeColorArrayName(0); }
68  virtual const char* GetGraphEdgeColorArrayName(int idx);
69 
70  virtual void SetColorGraphEdgesByArray(bool vis) { this->SetColorGraphEdgesByArray(vis, 0); }
71  virtual void SetColorGraphEdgesByArray(bool vis, int idx);
72  virtual bool GetColorGraphEdgesByArray() { return this->GetColorGraphEdgesByArray(0); }
73  virtual bool GetColorGraphEdgesByArray(int idx);
74  vtkBooleanMacro(ColorGraphEdgesByArray, bool);
75 
77  {
78  this->SetGraphEdgeColorArrayName("fraction", 0);
79  }
80  virtual void SetGraphEdgeColorToSplineFraction(int idx)
81  {
82  this->SetGraphEdgeColorArrayName("fraction", idx);
83  }
84 
85  virtual void SetGraphVisibility(bool vis) { this->SetGraphVisibility(vis, 0); }
86  virtual void SetGraphVisibility(bool vis, int idx);
87  virtual bool GetGraphVisibility() { return this->GetGraphVisibility(0); }
88  virtual bool GetGraphVisibility(int idx);
89  vtkBooleanMacro(GraphVisibility, bool);
90 
91  virtual void SetBundlingStrength(double strength) { this->SetBundlingStrength(strength, 0); }
92  virtual void SetBundlingStrength(double strength, int idx);
93  virtual double GetBundlingStrength() { return this->GetBundlingStrength(0); }
94  virtual double GetBundlingStrength(int idx);
95 
97 
103  virtual void SetGraphSplineType(int type, int idx);
104  virtual int GetGraphSplineType(int idx);
106 
107  virtual void SetGraphEdgeLabelFontSize(int size) { this->SetGraphEdgeLabelFontSize(size, 0); }
108  virtual void SetGraphEdgeLabelFontSize(int size, int idx);
109  virtual int GetGraphEdgeLabelFontSize() { return this->GetGraphEdgeLabelFontSize(0); }
110  virtual int GetGraphEdgeLabelFontSize(int idx);
111 
112 protected:
115 
117 
120  bool AddToView(vtkView* view) override;
121  bool RemoveFromView(vtkView* view) override;
123 
127  bool ValidIndex(int idx);
128 
129  vtkSelection* ConvertSelection(vtkView* view, vtkSelection* sel) override;
130 
131  int FillInputPortInformation(int port, vtkInformation* info) override;
132 
136  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
137  vtkInformationVector* outputVector) override;
138 
139  void ApplyViewTheme(vtkViewTheme* theme) override;
140 
141  class Internals;
142  Internals* Implementation;
143 
144 private:
146  void operator=(const vtkRenderedHierarchyRepresentation&) = delete;
147 };
148 
149 #endif
vtkSelection * ConvertSelection(vtkView *view, vtkSelection *sel) override
Convert the selection to a type appropriate for sharing with other representations through vtkAnnotat...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store vtkAlgorithm input/output information.
virtual void SetGraphEdgeLabelArrayName(const char *name)
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:59
virtual void SetGraphEdgeColorArrayName(const char *name)
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:48
The superclass for all views.
Definition: vtkView.h:63
a simple class to control print indentation
Definition: vtkIndent.h:39
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Connect inputs to internal pipeline.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
bool RemoveFromView(vtkView *view) override
Called by the view to add/remove this representation.
Store zero or more vtkInformation instances.
void ApplyViewTheme(vtkViewTheme *theme) override
Apply a theme to this representation.
static vtkRenderedGraphRepresentation * New()
bool AddToView(vtkView *view) override
Called by the view to add/remove this representation.