46#include <ttkMergeTreeTemporalReductionModule.h>
50#include <vtkMultiBlockDataSet.h>
51#include <vtkSmartPointer.h>
52#include <vtkUnstructuredGrid.h>
65 std::string TimeVariableName{
""};
68 bool DoResampleToImage =
false;
74 std::vector<vtkUnstructuredGrid *> treesNodes;
75 std::vector<vtkUnstructuredGrid *> treesArcs;
76 std::vector<vtkDataSet *> treesSegmentation;
78 std::vector<std::vector<int>> treesNodeCorrMesh;
79 std::vector<double> emptyTreeDistances;
80 std::vector<ttk::ftm::MergeTree<double>> keyFrames;
81 std::vector<int> removed;
83 void setDataVisualization(
int numInputs) {
85 treesNodes = std::vector<vtkUnstructuredGrid *>(numInputs);
86 treesArcs = std::vector<vtkUnstructuredGrid *>(numInputs);
87 treesSegmentation = std::vector<vtkDataSet *>(numInputs);
90 void resetDataVisualization() {
91 setDataVisualization(0);
92 treesNodeCorrMesh = std::vector<std::vector<int>>();
93 emptyTreeDistances = std::vector<double>();
94 keyFrames = std::vector<ttk::ftm::MergeTree<double>>();
95 removed = std::vector<int>();
98 bool isDataVisualizationFilled() {
99 return treesNodeCorrMesh.size() != 0 and keyFrames.size() != 0
100 and emptyTreeDistances.size() != 0 and removed.size() != 0;
112 resetDataVisualization();
121 resetDataVisualization();
130 resetDataVisualization();
139 resetDataVisualization();
148 resetDataVisualization();
157 resetDataVisualization();
166 resetDataVisualization();
176 resetDataVisualization();
185 resetDataVisualization();
194 resetDataVisualization();
203 resetDataVisualization();
212 resetDataVisualization();
219 int idx,
int port,
int connection,
int fieldAssociation,
const char *name) {
220 SetInputArrayToProcess(idx, port, connection, fieldAssociation, name);
221 TimeVariableName = std::string(name);
223 resetDataVisualization();
225 vtkGetMacro(TimeVariableName, std::string);
259 vtkInformationVector **inputVector,
260 vtkInformationVector *outputVector)
override;
262 template <
class dataType>
263 int run(vtkInformationVector *outputVector,
266 template <
class dataType>
270 template <
class dataType>
271 int runOutput(vtkInformationVector *outputVector,
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
double SetPersistenceThreshold()
void SetUseMinMaxPair(bool useMinMaxPair)
void SetUseL2Distance(double useL2)
int run(vtkInformationVector *outputVector, std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees)
bool GetUseCustomTimeVariable()
void SetEpsilon3Tree1(double epsilon3Tree1)
void SetEpsilon2Tree1(double epsilon2Tree1)
static ttkMergeTreeTemporalReduction * New()
void SetEpsilon1UseFarthestSaddle(bool epsilon1UseFarthestSaddle)
void SetRemovalPercentage(double removePerc)
void SetPersistenceThreshold(double persistenceThreshold)
void SetAssignmentSolver(int assignmentSolver)
void SetDeleteMultiPersPairs(bool doDelete)
int runOutput(vtkInformationVector *outputVector, std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees)
~ttkMergeTreeTemporalReduction() override
int GetAssignmentSolver()
double SetEpsilon3Tree1()
bool GetEpsilon1UseFarthestSaddle()
void SetTimeVariableName(int idx, int port, int connection, int fieldAssociation, const char *name)
void SetEpsilonTree1(double epsilonTree1)
double GetUseL2Distance()
double SetEpsilon2Tree1()
double GetRemovalPercentage()
void SetUseCustomTimeVariable(bool useCustomTime)
ttkMergeTreeTemporalReduction()
void SetUsePathMappings(double usePM)
bool SetDeleteMultiPersPairs()
int runCompute(std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees)
bool epsilon1UseFarthestSaddle_
bool deleteMultiPersPairs_
double persistenceThreshold_
bool useCustomTimeVariable_
double removalPercentage_