TTK
Loading...
Searching...
No Matches
ttkPlanarGraphLayout.h
Go to the documentation of this file.
1
48
49#pragma once
50
51// Module
52#include <ttkPlanarGraphLayoutModule.h>
53
54// VTK includes
55#include <ttkAlgorithm.h>
56#include <vtkUnstructuredGrid.h>
57
58// TTK includes
59#include <PlanarGraphLayout.h>
60#include <vtkUnstructuredGrid.h>
61
62class TTKPLANARGRAPHLAYOUT_EXPORT ttkPlanarGraphLayout
63 : public ttkAlgorithm,
64 protected ttk::PlanarGraphLayout {
65
66private:
67 // --- Graph Planar Layout
68 // optional field data
69 bool UseSequences{false};
70 bool UseSizes{false};
71 bool UseBranches{false};
72 bool UseLevels{false};
73
74 // output field name
75 std::string OutputArrayName{"Layout"};
76
77 // --- Merge Tree Planar Layout
78 bool InputIsAMergeTree = false;
79 bool BranchDecompositionPlanarLayout = false;
80 bool PathPlanarLayout = false;
81 double BranchSpacing = 1.;
82 double ImportantPairs = 10.; // important pairs threshold
83 int MaximumImportantPairs = 0;
84 int MinimumImportantPairs = 0;
85 double ImportantPairsSpacing = 1.;
86 double NonImportantPairsSpacing = 0.1;
87 double NonImportantPairsProximity = 0.05;
88 std::string ExcludeImportantPairsLower = "";
89 std::string ExcludeImportantPairsHigher = "";
90
91public:
92 // --- Graph Planar Layout
93 // getters and setters for optional arrays
94 vtkSetMacro(UseSequences, bool);
95 vtkGetMacro(UseSequences, bool);
96
97 vtkSetMacro(UseSizes, bool);
98 vtkGetMacro(UseSizes, bool);
99
100 vtkSetMacro(UseBranches, bool);
101 vtkGetMacro(UseBranches, bool);
102
103 vtkSetMacro(UseLevels, bool);
104 vtkGetMacro(UseLevels, bool);
105
106 // getters and setters for output array name
107 vtkSetMacro(OutputArrayName, const std::string &);
108 vtkGetMacro(OutputArrayName, std::string);
109
110 // --- Merge Tree Planar Layout
111 vtkSetMacro(InputIsAMergeTree, bool);
112 vtkGetMacro(InputIsAMergeTree, bool);
113
114 vtkSetMacro(BranchDecompositionPlanarLayout, bool);
115 vtkGetMacro(BranchDecompositionPlanarLayout, bool);
116
117 vtkSetMacro(PathPlanarLayout, bool);
118 vtkGetMacro(PathPlanarLayout, bool);
119
120 vtkSetMacro(BranchSpacing, double);
121 vtkGetMacro(BranchSpacing, double);
122
123 vtkSetMacro(ImportantPairs, double);
124 vtkGetMacro(ImportantPairs, double);
125
126 vtkSetMacro(MaximumImportantPairs, int);
127 vtkGetMacro(MaximumImportantPairs, int);
128
129 vtkSetMacro(MinimumImportantPairs, int);
130 vtkGetMacro(MinimumImportantPairs, int);
131
132 vtkSetMacro(ImportantPairsSpacing, double);
133 vtkGetMacro(ImportantPairsSpacing, double);
134
135 vtkSetMacro(NonImportantPairsSpacing, double);
136 vtkGetMacro(NonImportantPairsSpacing, double);
137
138 vtkSetMacro(NonImportantPairsProximity, double);
139 vtkGetMacro(NonImportantPairsProximity, double);
140
141 vtkSetMacro(ExcludeImportantPairsLower, const std::string &);
142 vtkGetMacro(ExcludeImportantPairsLower, std::string);
143
144 vtkSetMacro(ExcludeImportantPairsHigher, const std::string &);
145 vtkGetMacro(ExcludeImportantPairsHigher, std::string);
146
147 // ---
150
151protected:
154
155 int FillInputPortInformation(int port, vtkInformation *info) override;
156 int FillOutputPortInformation(int port, vtkInformation *info) override;
157 int RequestData(vtkInformation *request,
158 vtkInformationVector **inputVector,
159 vtkInformationVector *outputVector) override;
160
161 int planarGraphLayoutCall(vtkInformation *request,
162 vtkInformationVector **inputVector,
163 vtkInformationVector *outputVector);
164 int mergeTreePlanarLayoutCall(vtkInformation *request,
165 vtkInformationVector **inputVector,
166 vtkInformationVector *outputVector);
167
168 template <class dataType>
169 int mergeTreePlanarLayoutCallTemplate(vtkUnstructuredGrid *treeNodes,
170 vtkUnstructuredGrid *treeArcs,
171 vtkUnstructuredGrid *output);
172};
virtual int RequestData(vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
int FillInputPortInformation(int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
int FillOutputPortInformation(int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
int mergeTreePlanarLayoutCallTemplate(vtkUnstructuredGrid *treeNodes, vtkUnstructuredGrid *treeArcs, vtkUnstructuredGrid *output)
int mergeTreePlanarLayoutCall(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int planarGraphLayoutCall(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
~ttkPlanarGraphLayout() override
static ttkPlanarGraphLayout * New()
TTK planarGraphLayout processing package.