TTK
Loading...
Searching...
No Matches
ttkPersistenceDiagramApproximation.h
Go to the documentation of this file.
1
15//
34
35#pragma once
36
37// VTK includes
38#include <vtkDataArray.h>
39#include <vtkUnstructuredGrid.h>
40
41// VTK Module
42#include <ttkPersistenceDiagramApproximationModule.h>
43
44// ttk code includes
45#include <PersistenceDiagram.h>
46#include <ttkAlgorithm.h>
47#include <ttkMacros.h>
48
49class TTKPERSISTENCEDIAGRAMAPPROXIMATION_EXPORT
51 protected ttk::PersistenceDiagram {
52
53public:
55
57
58 vtkSetMacro(ForceInputOffsetScalarField, bool);
59 vtkGetMacro(ForceInputOffsetScalarField, bool);
60
61 vtkSetMacro(ShowInsideDomain, bool);
62 vtkGetMacro(ShowInsideDomain, bool);
63
64 vtkGetMacro(StartingResolutionLevel, int);
65 vtkSetMacro(StartingResolutionLevel, int);
66
67 vtkGetMacro(StoppingResolutionLevel, int);
68 vtkSetMacro(StoppingResolutionLevel, int);
69
70 vtkGetMacro(IsResumable, bool);
71 vtkSetMacro(IsResumable, bool);
72
73 vtkGetMacro(TimeLimit, double);
74 vtkSetMacro(TimeLimit, double);
75
76 vtkGetMacro(Epsilon, double);
77 vtkSetMacro(Epsilon, double);
78
79protected:
81
82 int RequestData(vtkInformation *request,
83 vtkInformationVector **inputVector,
84 vtkInformationVector *outputVector) override;
85
86 int FillInputPortInformation(int port, vtkInformation *info) override;
87 int FillOutputPortInformation(int port, vtkInformation *info) override;
88
89private:
90 template <typename scalarType, typename triangulationType>
91 int dispatch(vtkUnstructuredGrid *outputCTPersistenceDiagram,
92 vtkUnstructuredGrid *outputBounds,
93 vtkDataArray *const inputScalarsArray,
94 const scalarType *const inputScalars,
95 scalarType *outputScalars,
96 SimplexId *outputOffsets,
97 int *outputMonotonyOffsets,
98 const SimplexId *const inputOrder,
99 const triangulationType *triangulation);
100
101 template <typename scalarType, typename triangulationType>
102 int drawBottleneckBounds(vtkUnstructuredGrid *outputBounds,
103 const std::vector<ttk::PersistencePair> &diagram,
104 vtkDataArray *inputScalarsArray,
105 const scalarType *const outputScalars,
106 const scalarType *const inputScalars,
107 const triangulationType *triangulation) const;
108
109 bool ForceInputOffsetScalarField{false};
110 bool ShowInsideDomain{false};
111};
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 for the computation of an approximation of a persistence diagram.
static ttkPersistenceDiagramApproximation * New()
TTK processing package for the computation of persistence diagrams.