TTK
Loading...
Searching...
No Matches
ttkTrackingFromFields.h
Go to the documentation of this file.
1
30
31#pragma once
32
33#include <vtkDataSet.h>
34#include <vtkUnstructuredGrid.h>
35
36// VTK Module
37#include <TrackingFromFields.h>
38#include <ttkAlgorithm.h>
39#include <ttkTrackingFromFieldsModule.h>
40
41#include <algorithm>
42#include <string>
43
44class TTKTRACKINGFROMFIELDS_EXPORT ttkTrackingFromFields
45 : public ttkAlgorithm,
46 protected ttk::TrackingFromFields {
47
48public:
50
52
55 vtkSetMacro(Sampling, int);
56 vtkGetMacro(Sampling, int);
58
61 vtkSetMacro(StartTimestep, int);
62 vtkGetMacro(StartTimestep, int);
64
67 vtkSetMacro(EndTimestep, int);
68 vtkGetMacro(EndTimestep, int);
70
74 vtkSetMacro(Tolerance, double);
75 vtkGetMacro(Tolerance, double);
77
80 vtkSetMacro(PX, double);
81 vtkGetMacro(PX, double);
83
86 vtkSetMacro(PY, double);
87 vtkGetMacro(PY, double);
89
92 vtkSetMacro(PZ, double);
93 vtkGetMacro(PZ, double);
95
98 vtkSetMacro(PE, double);
99 vtkGetMacro(PE, double);
101
104 vtkSetMacro(PS, double);
105 vtkGetMacro(PS, double);
107
111 vtkSetMacro(WassersteinMetric, const std::string &);
112 vtkGetMacro(WassersteinMetric, std::string);
114
115 vtkSetMacro(DistanceAlgorithm, const std::string &);
116 vtkGetMacro(DistanceAlgorithm, std::string);
117
122 vtkSetMacro(PVAlgorithm, int);
123 vtkGetMacro(PVAlgorithm, int);
125
130 vtkSetMacro(UseGeometricSpacing, bool);
131 vtkGetMacro(UseGeometricSpacing, bool);
133
137 vtkSetMacro(Spacing, double);
138 vtkGetMacro(Spacing, double);
140
143 vtkSetMacro(DoPostProc, bool);
144 vtkGetMacro(DoPostProc, bool);
146
150 vtkSetMacro(PostProcThresh, double);
151 vtkGetMacro(PostProcThresh, double);
153
154protected:
156
157 int FillInputPortInformation(int port, vtkInformation *info) override;
158 int FillOutputPortInformation(int port, vtkInformation *info) override;
159 int RequestData(vtkInformation *request,
160 vtkInformationVector **inputVector,
161 vtkInformationVector *outputVector) override;
162
163private:
164 // Sampling config.
165 int StartTimestep{0};
166 int EndTimestep{-1};
167 int Sampling{1};
168
169 // Filtering config.
170 double Tolerance{1};
171 double PX{1};
172 double PY{1};
173 double PZ{0};
174 double PE{0};
175 double PS{0};
176
177 // Bottleneck config.
178 bool UseGeometricSpacing{false};
179 bool DoPostProc{false};
180 double PostProcThresh{0.0};
181 double Spacing{1.0};
182 std::string DistanceAlgorithm{"ttk"};
183 int PVAlgorithm{-1};
184 std::string WassersteinMetric{"2"};
185
186 template <class dataType, class triangulationType>
187 int trackWithPersistenceMatching(vtkUnstructuredGrid *output,
188 unsigned long fieldNumber,
189 const triangulationType *triangulation);
190};
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 takes an input time-varying data set (represented by a list of scalar fields) and...
static ttkTrackingFromFields * New()