TTK
Loading...
Searching...
No Matches
ttkDimensionReductionMetrics.h
Go to the documentation of this file.
1
22
23#pragma once
24
25// VTK Module
26#include <ttkDimensionReductionMetricsModule.h>
27
28// VTK Includes
29#include <ttkAlgorithm.h>
30
31// TTK Base Includes
33
34class TTKDIMENSIONREDUCTIONMETRICS_EXPORT ttkDimensionReductionMetrics
35 : public ttkAlgorithm // we inherit from the generic ttkAlgorithm class
36 ,
37 protected ttk::DimensionReductionMetrics // and we inherit from the base
38 // class
39{
40private:
41 bool SelectInputFieldsWithRegexp{false};
42 std::string InputRegexpString{".*"};
43 std::vector<std::string> InputScalarFields{};
44
45 bool SelectRepresentationFieldsWithRegexp{false};
46 std::string RepresentationRegexpString{".*"};
47 std::vector<std::string> RepresentationScalarFields{};
48
49public:
52
53 void SetInputScalarFields(const std::string &s) {
54 InputScalarFields.push_back(s);
55 Modified();
56 }
57
59 InputScalarFields.clear();
60 Modified();
61 }
62
63 void SetRepresentationScalarFields(const std::string &s) {
64 RepresentationScalarFields.push_back(s);
65 Modified();
66 }
67
69 RepresentationScalarFields.clear();
70 Modified();
71 }
72
73 vtkSetMacro(SelectInputFieldsWithRegexp, bool);
74 vtkGetMacro(SelectInputFieldsWithRegexp, bool);
75
76 vtkSetMacro(InputRegexpString, const std::string &);
77 vtkGetMacro(InputRegexpString, std::string);
78
79 vtkSetMacro(SelectRepresentationFieldsWithRegexp, bool);
80 vtkGetMacro(SelectRepresentationFieldsWithRegexp, bool);
81
82 vtkSetMacro(RepresentationRegexpString, const std::string &);
83 vtkGetMacro(RepresentationRegexpString, std::string);
84
85 vtkSetMacro(Wasserstein, double);
86 vtkGetMacro(Wasserstein, double);
87
88 vtkSetMacro(SampleSize, int);
89 vtkGetMacro(SampleSize, int);
90
91 vtkSetMacro(NeighborhoodSize, unsigned);
92 vtkGetMacro(NeighborhoodSize, unsigned);
93
94protected:
96 ~ttkDimensionReductionMetrics() override = default;
97
98 int FillInputPortInformation(int port, vtkInformation *info) override;
99
100 int FillOutputPortInformation(int port, vtkInformation *info) override;
101
102 int RequestData(vtkInformation *request,
103 vtkInformationVector **inputVector,
104 vtkInformationVector *outputVector) override;
105};
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 ttkDimensionReductionMetrics * New()
void SetRepresentationScalarFields(const std::string &s)
~ttkDimensionReductionMetrics() override=default
void SetInputScalarFields(const std::string &s)
TTK base class that computes different scores for the quality of a dimension reduction.