TTK
Loading...
Searching...
No Matches
ttkPointDataConverter.h
Go to the documentation of this file.
1
20
21#pragma once
22
23// VTK Module
24#include <ttkPointDataConverterModule.h>
25
26// ttk code includes
27#include <ttkAlgorithm.h>
28
29class TTKPOINTDATACONVERTER_EXPORT ttkPointDataConverter : public ttkAlgorithm {
30
31public:
33
35
36 void SetOutputType(int outputType) {
37 OutputType = static_cast<SupportedType>(outputType);
38 Modified();
39 }
41 return static_cast<int>(OutputType);
42 }
43
44 vtkGetMacro(UseNormalization, bool);
45 vtkSetMacro(UseNormalization, bool);
46
47protected:
49
50 int FillInputPortInformation(int port, vtkInformation *info) override;
51 int FillOutputPortInformation(int port, vtkInformation *info) override;
52 int RequestData(vtkInformation *request,
53 vtkInformationVector **inputVector,
54 vtkInformationVector *outputVector) override;
55
56 template <typename InputFieldType,
57 typename OutputFieldType,
58 typename OutputVTKArrayType>
59 int convert(vtkDataArray *inputData, vtkDataSet *output);
60
61private:
62 enum class SupportedType {
63 Char = 0,
64 Double,
65 Float,
66 Int,
67 IdType,
68 Short,
69 UnsignedShort,
70 UnsignedChar,
71 };
72
73 SupportedType OutputType{SupportedType::Char};
74 bool UseNormalization{false};
75};
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 converts data types for point-based scalar fields (for instance,...
static ttkPointDataConverter * New()
void SetOutputType(int outputType)