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;
83 std::vector<ttk::ftm::MergeTree<double>> baryMTree, inputMTrees;
84 std::vector<vtkUnstructuredGrid *> baryTreeNodes, inputTreesNodes;
85 std::vector<vtkUnstructuredGrid *> baryTreeArcs, inputTreesArcs;
86 std::vector<vtkDataSet *> baryTreeSegmentation, inputTreesSegmentation;
88 bool processFirstInput;
89 std::vector<ttk::ftm::MergeTree<double>> reconstructedTrees;
90 std::vector<double> reconstructionErrors;
92 std::vector<std::tuple<ttk::ftm::idNode, ttk::ftm::idNode, double>>>
93 recInputMatchings, recBaryMatchings;
94 std::vector<std::vector<ttk::ftm::MergeTree<double>>> geodesicsTrees;
95 std::vector<ttk::ftm::MergeTree<double>> geodesicsEllipses,
96 geodesicsRectangle, geodesicsSurface;
97 vtkFieldData *inputFieldData;
99 vtkMTimeType tableCoefficientsMTime, tableVectorsMTime, tableCorrelationMTime,
100 blockInputTreesMTime;
102 void setDataVisualization(
int numTrees) {
105 baryTreeNodes.resize(1);
106 baryTreeArcs.resize(1);
107 baryTreeSegmentation.resize(1);
109 inputMTrees.resize(numTrees);
110 inputTreesNodes.resize(numTrees);
111 inputTreesArcs.resize(numTrees);
112 inputTreesSegmentation.resize(numTrees);
115 bool isDataVisualizationFilled() {
116 return (ReconstructInputTrees == (reconstructedTrees.size() != 0))
117 and (ConstructGeodesicsTrees == (geodesicsTrees.size() != 0))
118 and (ConstructEllipses == (geodesicsEllipses.size() != 0))
119 and (ConstructRectangle == (geodesicsRectangle.size() != 0))
120 and (ConstructSurface == (geodesicsSurface.size() != 0))
121 and (not OutputInputTrees) and geodesicsDistances_.size() != 0;
124 void resetDataVisualization() {
125 setDataVisualization(0);
126 reconstructedTrees.clear();
127 geodesicsTrees.clear();
128 geodesicsEllipses.clear();
129 geodesicsRectangle.clear();
130 geodesicsSurface.clear();
131 geodesicsDistances_.clear();
143 resetDataVisualization();
151 vtkSetMacro(OutputInputTrees,
bool);
152 vtkGetMacro(OutputInputTrees,
bool);
154 vtkSetMacro(OutputInputTreesSegmentation,
bool);
155 vtkGetMacro(OutputInputTreesSegmentation,
bool);
157 vtkSetMacro(OutputBarycenter,
bool);
158 vtkGetMacro(OutputBarycenter,
bool);
160 vtkSetMacro(ReconstructInputTrees,
bool);
161 vtkGetMacro(ReconstructInputTrees,
bool);
164 computeReconstructionError_ = b;
166 resetDataVisualization();
168 vtkGetMacro(computeReconstructionError_,
bool);
171 transferInputTreesInformation_ = b;
173 resetDataVisualization();
175 vtkGetMacro(transferInputTreesInformation_,
bool);
178 transferBarycenterInformation_ = b;
180 resetDataVisualization();
182 vtkGetMacro(transferBarycenterInformation_,
bool);
184 vtkSetMacro(ConstructGeodesicsTrees,
bool);
185 vtkGetMacro(ConstructGeodesicsTrees,
bool);
187 vtkSetMacro(ConstructEllipses,
bool);
188 vtkGetMacro(ConstructEllipses,
bool);
190 vtkSetMacro(ConstructRectangle,
bool);
191 vtkGetMacro(ConstructRectangle,
bool);
194 RectangleMultiplier = mult;
196 geodesicsRectangle.clear();
198 vtkGetMacro(RectangleMultiplier,
unsigned int);
200 vtkSetMacro(ConstructSurface,
bool);
201 vtkGetMacro(ConstructSurface,
bool);
204 ProcessSecondInput = b;
206 resetDataVisualization();
208 vtkGetMacro(ProcessSecondInput,
bool);
241 vtkInformationVector **inputVector,
242 vtkInformationVector *outputVector)
override;
244 template <
class dataType>
245 int run(vtkInformationVector *outputVector,
249 template <
class dataType>
251 vtkInformationVector *outputVector,
255 template <
class dataType>