54class TTKMERGETREEPRINCIPALGEODESICSDECODING_EXPORT
68 bool OutputInputTrees =
false;
69 bool OutputInputTreesSegmentation =
false;
70 bool OutputBarycenter =
true;
71 bool ReconstructInputTrees =
true;
72 bool ConstructGeodesicsTrees =
false;
73 bool ConstructEllipses =
false;
74 bool ConstructRectangle =
false;
75 unsigned int RectangleMultiplier = 1;
76 bool ConstructSurface =
false;
77 bool ProcessSecondInput =
false;
79 int DiagramPairTypes = 0;
85 std::vector<ttk::ftm::MergeTree<double>> baryMTree, inputMTrees;
86 std::vector<vtkUnstructuredGrid *> baryTreeNodes, inputTreesNodes;
87 std::vector<vtkUnstructuredGrid *> baryTreeArcs, inputTreesArcs;
88 std::vector<vtkDataSet *> baryTreeSegmentation, inputTreesSegmentation;
90 bool processFirstInput;
91 std::vector<ttk::ftm::MergeTree<double>> reconstructedTrees;
92 std::vector<double> reconstructionErrors;
94 std::vector<std::tuple<ttk::ftm::idNode, ttk::ftm::idNode, double>>>
95 recInputMatchings, recBaryMatchings;
96 std::vector<std::vector<ttk::ftm::MergeTree<double>>> geodesicsTrees;
97 std::vector<ttk::ftm::MergeTree<double>> geodesicsEllipses,
98 geodesicsRectangle, geodesicsSurface;
99 vtkFieldData *inputFieldData;
101 vtkMTimeType tableCoefficientsMTime, tableVectorsMTime, tableCorrelationMTime,
102 blockInputTreesMTime;
104 void setDataVisualization(
int numTrees) {
107 baryTreeNodes.resize(1);
108 baryTreeArcs.resize(1);
109 baryTreeSegmentation.resize(1);
111 inputMTrees.resize(numTrees);
112 inputTreesNodes.resize(numTrees);
113 inputTreesArcs.resize(numTrees);
114 inputTreesSegmentation.resize(numTrees);
117 bool isDataVisualizationFilled() {
118 return (ReconstructInputTrees == (reconstructedTrees.size() != 0))
119 and (ConstructGeodesicsTrees == (geodesicsTrees.size() != 0))
120 and (ConstructEllipses == (geodesicsEllipses.size() != 0))
121 and (ConstructRectangle == (geodesicsRectangle.size() != 0))
122 and (ConstructSurface == (geodesicsSurface.size() != 0))
126 void resetDataVisualization() {
127 setDataVisualization(0);
128 reconstructedTrees.clear();
129 geodesicsTrees.clear();
130 geodesicsEllipses.clear();
131 geodesicsRectangle.clear();
132 geodesicsSurface.clear();
145 resetDataVisualization();
153 vtkSetMacro(OutputInputTrees,
bool);
154 vtkGetMacro(OutputInputTrees,
bool);
156 vtkSetMacro(OutputInputTreesSegmentation,
bool);
157 vtkGetMacro(OutputInputTreesSegmentation,
bool);
159 vtkSetMacro(OutputBarycenter,
bool);
160 vtkGetMacro(OutputBarycenter,
bool);
162 vtkSetMacro(ReconstructInputTrees,
bool);
163 vtkGetMacro(ReconstructInputTrees,
bool);
168 resetDataVisualization();
175 resetDataVisualization();
182 resetDataVisualization();
186 vtkSetMacro(ConstructGeodesicsTrees,
bool);
187 vtkGetMacro(ConstructGeodesicsTrees,
bool);
189 vtkSetMacro(ConstructEllipses,
bool);
190 vtkGetMacro(ConstructEllipses,
bool);
192 vtkSetMacro(ConstructRectangle,
bool);
193 vtkGetMacro(ConstructRectangle,
bool);
196 RectangleMultiplier = mult;
198 geodesicsRectangle.clear();
200 vtkGetMacro(RectangleMultiplier,
unsigned int);
202 vtkSetMacro(ConstructSurface,
bool);
203 vtkGetMacro(ConstructSurface,
bool);
206 ProcessSecondInput = b;
208 resetDataVisualization();
210 vtkGetMacro(ProcessSecondInput,
bool);
243 vtkInformationVector **inputVector,
244 vtkInformationVector *outputVector)
override;
246 template <
class dataType>
247 int run(vtkInformationVector *outputVector,
251 template <
class dataType>
253 vtkInformationVector *outputVector,
257 template <
class dataType>