TTK
Loading...
Searching...
No Matches
ttkDelaunayRipsPersistenceGenerators.h
Go to the documentation of this file.
1
29
30#pragma once
31
32// VTK Module
33#include <ttkDelaunayRipsPersistenceGeneratorsModule.h>
34
35// VTK Includes
36#include <ttkMacros.h>
37#include <vtkUnstructuredGrid.h>
38
39// TTK Includes
41#include <ttkAlgorithm.h>
42
43void GeneratorsToVTU(vtkUnstructuredGrid *vtu,
44 vtkPoints *inputPoints,
45 const std::vector<ttk::rpd::Generator2> &generators);
46
47class TTKDELAUNAYRIPSPERSISTENCEGENERATORS_EXPORT
49 : public ttkAlgorithm, // we inherit from the generic ttkAlgorithm class
50 protected ttk::DelaunayRipsPersistenceDiagram { // and we inherit from the
51 // base
52 // class
53private:
54 bool KeepAllDataArrays{true};
55 bool SelectFieldsWithRegexp{false};
56 std::string RegexpString{".*"};
57 std::vector<std::string> ScalarFields{};
58
59public:
62
63 void SetScalarFields(const std::string &s) {
64 ScalarFields.push_back(s);
65 Modified();
66 }
67
69 ScalarFields.clear();
70 Modified();
71 }
72
73 vtkSetMacro(KeepAllDataArrays, bool);
74 vtkGetMacro(KeepAllDataArrays, bool);
75
76 vtkSetMacro(SelectFieldsWithRegexp, bool);
77 vtkGetMacro(SelectFieldsWithRegexp, bool);
78
79 vtkSetMacro(RegexpString, const std::string &);
80 vtkGetMacro(RegexpString, std::string);
81
82protected:
85
86 int FillInputPortInformation(int port, vtkInformation *info) override;
87
88 int FillOutputPortInformation(int port, vtkInformation *info) override;
89
90 int RequestData(vtkInformation *request,
91 vtkInformationVector **inputVector,
92 vtkInformationVector *outputVector) override;
93};
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
static ttkDelaunayRipsPersistenceGenerators * New()
~ttkDelaunayRipsPersistenceGenerators() override=default
TTK base class that computes the persistence diagram of a Delaunay-Rips filtration.
void GeneratorsToVTU(vtkUnstructuredGrid *vtu, vtkPoints *inputPoints, const std::vector< ttk::rpd::Generator2 > &generators)