TTK
Loading...
Searching...
No Matches
ttkTableDistanceMatrix.h
Go to the documentation of this file.
1
17
18#pragma once
19
20// VTK Module
21#include <ttkTableDistanceMatrixModule.h>
22
23// TTK code includes
24#include <LDistanceMatrix.h>
25#include <ttkAlgorithm.h>
26
27class TTKTABLEDISTANCEMATRIX_EXPORT ttkTableDistanceMatrix
28 : public ttkAlgorithm,
29 protected ttk::LDistanceMatrix {
30
31public:
33
35
36 void SetScalarFields(const std::string &s) {
37 ScalarFields.emplace_back(s);
38 Modified();
39 }
40
41 vtkSetMacro(SelectFieldsWithRegexp, bool);
42 vtkGetMacro(SelectFieldsWithRegexp, bool);
43
44 vtkSetMacro(RegexpString, const std::string &);
45 vtkGetMacro(RegexpString, std::string);
46
48 ScalarFields.clear();
49 Modified();
50 }
51
52 vtkSetMacro(DistanceType, const std::string &);
53 vtkGetMacro(DistanceType, std::string);
54
55protected:
57 ~ttkTableDistanceMatrix() override = default;
58
59 int FillInputPortInformation(int port, vtkInformation *info) override;
60 int FillOutputPortInformation(int port, vtkInformation *info) override;
61
62 int RequestData(vtkInformation *request,
63 vtkInformationVector **inputVector,
64 vtkInformationVector *outputVector) override;
65
66private:
67 std::vector<std::string> ScalarFields{};
68 std::string RegexpString{".*"};
69 bool SelectFieldsWithRegexp{false};
70};
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
Computes a distance matrix using LDistance from a vtkTable.
~ttkTableDistanceMatrix() override=default
static ttkTableDistanceMatrix * New()
void SetScalarFields(const std::string &s)