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 double BranchSpacing = 1.;
81 double ImportantPairs = 10.; // important pairs threshold
82 int MaximumImportantPairs = 0;
83 int MinimumImportantPairs = 0;
84 double ImportantPairsSpacing = 1.;
85 double NonImportantPairsSpacing = 0.1;
86 double NonImportantPairsProximity = 0.05;
87 std::string ExcludeImportantPairsLower = "";
88 std::string ExcludeImportantPairsHigher = "";
89
90public:
91 // --- Graph Planar Layout
92 // getters and setters for optional arrays
93 vtkSetMacro(UseSequences, bool);
94 vtkGetMacro(UseSequences, bool);
95
96 vtkSetMacro(UseSizes, bool);
97 vtkGetMacro(UseSizes, bool);
98
99 vtkSetMacro(UseBranches, bool);
100 vtkGetMacro(UseBranches, bool);
101
102 vtkSetMacro(UseLevels, bool);
103 vtkGetMacro(UseLevels, bool);
104
105 // getters and setters for output array name
106 vtkSetMacro(OutputArrayName, const std::string &);
107 vtkGetMacro(OutputArrayName, std::string);
108
109 // --- Merge Tree Planar Layout
110 vtkSetMacro(InputIsAMergeTree, bool);
111 vtkGetMacro(InputIsAMergeTree, bool);
112
113 vtkSetMacro(BranchDecompositionPlanarLayout, bool);
114 vtkGetMacro(BranchDecompositionPlanarLayout, bool);
115
116 vtkSetMacro(BranchSpacing, double);
117 vtkGetMacro(BranchSpacing, double);
118
119 vtkSetMacro(ImportantPairs, double);
120 vtkGetMacro(ImportantPairs, double);
121
122 vtkSetMacro(MaximumImportantPairs, int);
123 vtkGetMacro(MaximumImportantPairs, int);
124
125 vtkSetMacro(MinimumImportantPairs, int);
126 vtkGetMacro(MinimumImportantPairs, int);
127
128 vtkSetMacro(ImportantPairsSpacing, double);
129 vtkGetMacro(ImportantPairsSpacing, double);
130
131 vtkSetMacro(NonImportantPairsSpacing, double);
132 vtkGetMacro(NonImportantPairsSpacing, double);
133
134 vtkSetMacro(NonImportantPairsProximity, double);
135 vtkGetMacro(NonImportantPairsProximity, double);
136
137 vtkSetMacro(ExcludeImportantPairsLower, const std::string &);
138 vtkGetMacro(ExcludeImportantPairsLower, std::string);
139
140 vtkSetMacro(ExcludeImportantPairsHigher, const std::string &);
141 vtkGetMacro(ExcludeImportantPairsHigher, std::string);
142
143 // ---
146
147protected:
150
151 int FillInputPortInformation(int port, vtkInformation *info) override;
152 int FillOutputPortInformation(int port, vtkInformation *info) override;
153 int RequestData(vtkInformation *request,
154 vtkInformationVector **inputVector,
155 vtkInformationVector *outputVector) override;
156
157 int planarGraphLayoutCall(vtkInformation *request,
158 vtkInformationVector **inputVector,
159 vtkInformationVector *outputVector);
160 int mergeTreePlanarLayoutCall(vtkInformation *request,
161 vtkInformationVector **inputVector,
162 vtkInformationVector *outputVector);
163
164 template <class dataType>
165 int mergeTreePlanarLayoutCallTemplate(vtkUnstructuredGrid *treeNodes,
166 vtkUnstructuredGrid *treeArcs,
167 vtkUnstructuredGrid *output);
168};
Baseclass of all VTK filters that wrap ttk modules.
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
TTK VTK-filter that computes a planar graph layout.
~ttkPlanarGraphLayout() override
static ttkPlanarGraphLayout * New()
TTK planarGraphLayout processing package.