48#include <ttkMergeTreeAutoencoderModule.h>
52#include <vtkMultiBlockDataSet.h>
53#include <vtkUnstructuredGrid.h>
70 double oldEpsilonTree1;
76 std::vector<ttk::ftm::MergeTree<double>> intermediateDTrees;
77 std::vector<vtkUnstructuredGrid *> treesNodes, treesNodes2;
78 std::vector<vtkUnstructuredGrid *> treesArcs, treesArcs2;
79 std::vector<vtkDataSet *> treesSegmentation, treesSegmentation2;
81 void setDataVisualization(
int ttkNotUsed(numInputs),
85 void resetDataVisualization() {
86 setDataVisualization(0, 0);
87 treesSegmentation.clear();
88 treesSegmentation2.clear();
97 using vtkAlgorithm::SetInputArrayToProcess;
99 vtkAlgorithm::SetInputArrayToProcess(0, 2, 0, 6, name);
103 doCompute_ = doCompute;
105 resetDataVisualization();
112 normalizedWasserstein_ = nW;
114 resetDataVisualization();
121 encoderNoLayers_ = numberOfEncoderLayers;
123 resetDataVisualization();
130 scaleLayerAfterLatent_ = scaleLayerAfterLatent;
132 resetDataVisualization();
139 inputNumberOfAxes_ = numberOfAxes;
141 resetDataVisualization();
148 inputOriginPrimeSizePercent_ = originSize;
150 resetDataVisualization();
158 numberOfAxes_ = numberOfAxes;
160 resetDataVisualization();
167 latentSpaceOriginPrimeSizePercent_ = originSize;
169 resetDataVisualization();
178 resetDataVisualization();
185 barycenterSizeLimitPercent_ = percent;
187 resetDataVisualization();
194 minIteration_ = minIteration;
196 resetDataVisualization();
203 maxIteration_ = maxIteration;
205 resetDataVisualization();
212 iterationGap_ = iterationGap;
214 resetDataVisualization();
223 resetDataVisualization();
230 optimizer_ = optimizer;
232 resetDataVisualization();
239 gradientStepSize_ = lr;
241 resetDataVisualization();
250 resetDataVisualization();
259 resetDataVisualization();
266 reconstructionLossWeight_ = reconstructionLossWeight;
268 resetDataVisualization();
275 trackingLossWeight_ = trackingLossWeight;
277 resetDataVisualization();
284 metricLossWeight_ = metricLossWeight;
286 resetDataVisualization();
293 clusteringLossWeight_ = clusteringLossWeight;
295 resetDataVisualization();
302 customLossSpace_ = customLossSpace;
304 resetDataVisualization();
311 customLossActivate_ = customLossActivate;
313 resetDataVisualization();
320 normalizeMetricLoss_ = normalizeMetricLoss;
322 resetDataVisualization();
329 clusteringLossTemp_ = clusteringLossTemperature;
331 resetDataVisualization();
338 customLossDynamicWeight_ = customLossDynamicWeight;
340 resetDataVisualization();
349 resetDataVisualization();
356 euclideanVectorsInit_ = euclideanVectorsInit;
358 resetDataVisualization();
365 initOriginPrimeStructByCopy_ = initOriginPrimeStructByCopy;
367 resetDataVisualization();
374 trackingLossDecoding_ = trackingLossDecoding;
376 resetDataVisualization();
383 trackingLossInitRandomness_ = trackingLossInitRandomness;
385 resetDataVisualization();
392 deterministic_ = deterministic;
394 resetDataVisualization();
401 activate_ = activate;
403 resetDataVisualization();
410 activationFunction_ = activationFunction;
412 resetDataVisualization();
419 fullSymmetricAE_ = fullSymmetricAE;
421 resetDataVisualization();
428 activateOutputInit_ = activateOutputInit;
430 resetDataVisualization();
437 mixtureCoefficient_ = joinSplitMixtureCoefficient;
439 resetDataVisualization();
446 epsilon1UseFarthestSaddle_ = epsilon1UseFarthestSaddle;
448 resetDataVisualization();
455 epsilonTree1_ = epsilonTree1;
458 resetDataVisualization();
465 epsilon2Tree1_ = epsilon2Tree1;
467 resetDataVisualization();
474 epsilon3Tree1_ = epsilon3Tree1;
476 resetDataVisualization();
483 persistenceThreshold_ = persistenceThreshold;
485 resetDataVisualization();
492 deleteMultiPersPairs_ = delMultiPersPairs;
494 resetDataVisualization();
502 nodePerTask_ = nodePerTask;
504 resetDataVisualization();
512 createOutput_ = createOutput;
514 resetDataVisualization();
551 vtkInformationVector **inputVector,
552 vtkInformationVector *outputVector)
override;
554 int run(vtkInformationVector *outputVector,
559 vtkInformationVector *outputVector,
564 vtkInformationVector *outputVector,
#define ttkNotUsed(x)
Mark function/method parameters that are not used in the function body at all.
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 wraps the ttk::MergeTreeAutoencoder module.
unsigned int GetNumberOfProjectionSteps()
void SetJoinSplitMixtureCoefficient(double joinSplitMixtureCoefficient)
void SetInitOriginPrimeStructByCopy(bool initOriginPrimeStructByCopy)
void SetCreateOutput(bool createOutput)
double GetReconstructionLossWeight()
void SetEuclideanVectorsInit(bool euclideanVectorsInit)
double GetBarycenterSizeLimitPercent()
void SetLatentSpaceOriginPrimeSizePercent(double originSize)
unsigned int GetNumberOfEncoderLayers()
void SetClusteringLossWeight(double clusteringLossWeight)
void SetEpsilon3Tree1(double epsilon3Tree1)
double GetClusteringLossTemperature()
void SetMinIteration(unsigned int minIteration)
bool GetNormalizedWasserstein()
unsigned int GetActivationFunction()
double GetEpsilon2Tree1()
double GetTrackingLossDecoding()
bool GetCustomLossSpace()
void SetCustomLossSpace(bool customLossSpace)
double GetTrackingLossInitRandomness()
void SetActivationFunction(unsigned int activationFunction)
void SetCustomLossActivate(bool customLossActivate)
double GetPersistenceThreshold()
static ttkMergeTreeAutoencoder * New()
bool GetCustomLossActivate()
void SetNodePerTask(int nodePerTask)
void SetScaleLayerAfterLatent(unsigned int scaleLayerAfterLatent)
double GetEpsilon3Tree1()
void SetNumberOfInit(unsigned int noInit)
void SetNumberOfEncoderLayers(unsigned int numberOfEncoderLayers)
void SetMaxIteration(unsigned int maxIteration)
void SetDeleteMultiPersPairs(bool delMultiPersPairs)
bool GetNormalizeMetricLoss()
bool GetInitOriginPrimeStructByCopy()
void SetDoCompute(bool doCompute)
void SetReconstructionLossWeight(double reconstructionLossWeight)
unsigned int GetInputNumberOfAxes()
unsigned int GetNumberOfInit()
void SetActivate(bool activate)
double GetJoinSplitMixtureCoefficient()
void SetDeterministic(bool deterministic)
double GetInputOriginPrimeSizePercent()
void SetNormalizeMetricLoss(bool normalizeMetricLoss)
void SetInputOriginPrimeSizePercent(double originSize)
int run(vtkInformationVector *outputVector, std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees, std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees2)
bool GetActivateOutputInit()
bool GetCustomLossDynamicWeight()
void SetGradientStepSize(double lr)
bool GetFullSymmetricAE()
void SetInputArrayToProcess(const char *name)
void SetFullSymmetricAE(bool fullSymmetricAE)
void SetClusteringLossTemperature(double clusteringLossTemperature)
double GetMetricLossWeight()
void SetTrackingLossDecoding(double trackingLossDecoding)
void SetBeta1(double beta)
bool GetEuclideanVectorsInit()
void SetEpsilon2Tree1(double epsilon2Tree1)
int runCompute(vtkInformationVector *outputVector, std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees, std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees2)
double GetTrackingLossWeight()
bool GetEpsilon1UseFarthestSaddle()
void SetTrackingLossWeight(double trackingLossWeight)
unsigned int GetScaleLayerAfterLatent()
void SetNumberOfAxes(unsigned int numberOfAxes)
bool GetDeleteMultiPersPairs()
unsigned int GetMinIteration()
void SetBatchSize(double bs)
double GetGradientStepSize()
void SetNumberOfProjectionSteps(unsigned int noSteps)
void SetBarycenterSizeLimitPercent(double percent)
void SetIterationGap(unsigned int iterationGap)
int runOutput(vtkInformationVector *outputVector, std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees, std::vector< vtkSmartPointer< vtkMultiBlockDataSet > > &inputTrees2)
void SetEpsilon1UseFarthestSaddle(bool epsilon1UseFarthestSaddle)
void SetTrackingLossInitRandomness(double trackingLossInitRandomness)
void SetBeta2(double beta)
unsigned int GetNumberOfAxes()
void SetNormalizedWasserstein(bool nW)
unsigned int GetMaxIteration()
void SetEpsilonTree1(double epsilonTree1)
void SetOptimizer(int optimizer)
void SetCustomLossDynamicWeight(bool customLossDynamicWeight)
double GetClusteringLossWeight()
double GetLatentSpaceOriginPrimeSizePercent()
void SetPersistenceThreshold(double persistenceThreshold)
void SetActivateOutputInit(bool activateOutputInit)
void SetInputNumberOfAxes(unsigned int numberOfAxes)
void SetMetricLossWeight(double metricLossWeight)
bool normalizeMetricLoss_
double latentSpaceOriginPrimeSizePercent_
unsigned int activationFunction_
double inputOriginPrimeSizePercent_
unsigned int maxIteration_
float clusteringLossTemp_
unsigned int minIteration_
double reconstructionLossWeight_
unsigned int iterationGap_
double trackingLossInitRandomness_
double trackingLossWeight_
bool trackingLossDecoding_
bool initOriginPrimeStructByCopy_
bool euclideanVectorsInit_
double clusteringLossWeight_
unsigned int inputNumberOfAxes_
bool scaleLayerAfterLatent_
bool customLossDynamicWeight_
unsigned int numberOfAxes_
double barycenterSizeLimitPercent_
double mixtureCoefficient_
bool epsilon1UseFarthestSaddle_
bool normalizedWasserstein_
bool deleteMultiPersPairs_
double persistenceThreshold_