TTK
Loading...
Searching...
No Matches
ttkDistanceMatrixDistortion.h
Go to the documentation of this file.
1
32
33#pragma once
34
35// VTK Module
36#include <ttkDistanceMatrixDistortionModule.h>
37
38// VTK Includes
39#include <ttkAlgorithm.h>
40
41// TTK Base Includes
43
44class TTKDISTANCEMATRIXDISTORTION_EXPORT ttkDistanceMatrixDistortion
45 : public ttkAlgorithm // we inherit from the generic ttkAlgorithm class
46 ,
47 protected ttk::DistanceMatrixDistortion // and we inherit from the base
48 // class
49{
50private:
51 // To store which column names we want to extract from the inputs.
52 std::vector<std::string> ScalarFieldsHigh{}, ScalarFieldsLow{};
53 std::string RegexpStringHigh{".*"}, RegexpStringLow{".*"};
54 bool SelectFieldsWithRegexpHigh{false};
55 bool SelectFieldsWithRegexpLow{false};
56
57public:
58 // Variable to choose which columns to use. Two different inputs:
59 // the low one and the high one, hence duplicate variables.
60 vtkSetMacro(SelectFieldsWithRegexpHigh, bool);
61 vtkGetMacro(SelectFieldsWithRegexpHigh, bool);
62 vtkSetMacro(SelectFieldsWithRegexpLow, bool);
63 vtkGetMacro(SelectFieldsWithRegexpLow, bool);
64 vtkSetMacro(DoNotNormalize, bool);
65 vtkGetMacro(DoNotNormalize, bool);
66
67 vtkSetMacro(RegexpStringHigh, const std::string &);
68 vtkGetMacro(RegexpStringHigh, std::string);
69 vtkSetMacro(RegexpStringLow, const std::string &);
70 vtkGetMacro(RegexpStringLow, std::string);
71
72 // Two functions because two inputs.
74 ScalarFieldsHigh.clear();
75 Modified();
76 }
78 ScalarFieldsLow.clear();
79 Modified();
80 }
81
84
85 // Two functions because two inputs. Used for columns selection.
86 void SetScalarFieldsHigh(const std::string &s) {
87 ScalarFieldsHigh.emplace_back(s);
88 Modified();
89 }
90 void SetScalarFieldsLow(const std::string &s) {
91 ScalarFieldsLow.emplace_back(s);
92 Modified();
93 }
94
95protected:
97 ~ttkDistanceMatrixDistortion() override = default;
98
99 int FillInputPortInformation(int port, vtkInformation *info) override;
100
101 int FillOutputPortInformation(int port, vtkInformation *info) override;
102
103 int RequestData(vtkInformation *request,
104 vtkInformationVector **inputVector,
105 vtkInformationVector *outputVector) override;
106};
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::DistanceMatrixDistortion module.
void SetScalarFieldsLow(const std::string &s)
~ttkDistanceMatrixDistortion() override=default
static ttkDistanceMatrixDistortion * New()
void SetScalarFieldsHigh(const std::string &s)