TTK
Loading...
Searching...
No Matches
ttkHelloWorld.h
Go to the documentation of this file.
1
38
39#pragma once
40
41// VTK Module
42#include <ttkHelloWorldModule.h>
43
44// VTK Includes
45#include <ttkAlgorithm.h>
46
47/* Note on including VTK modules
48 *
49 * Each VTK module that you include a header from needs to be specified in this
50 * module's vtk.module file, either in the DEPENDS or PRIVATE_DEPENDS (if the
51 * header is included in the cpp file only) sections.
52 *
53 * In order to find the corresponding module, check its location within the VTK
54 * source code. The VTK module name is composed of the path to the header. You
55 * can also find the module name within the vtk.module file located in the same
56 * directory as the header file.
57 *
58 * For example, vtkSphereSource.h is located in directory VTK/Filters/Sources/,
59 * so its corresponding VTK module is called VTK::FiltersSources. In this case,
60 * the vtk.module file would need to be extended to
61 *
62 * NAME
63 * ttkHelloWorld
64 * DEPENDS
65 * ttkAlgorithm
66 * VTK::FiltersSources
67 */
68
69// TTK Base Includes
70#include <HelloWorld.h>
71
72class TTKHELLOWORLD_EXPORT ttkHelloWorld
73 : public ttkAlgorithm // we inherit from the generic ttkAlgorithm class
74 ,
75 protected ttk::HelloWorld // and we inherit from the base class
76{
77private:
82 std::string OutputArrayName{"AveragedScalarField"};
83
84public:
89 vtkSetMacro(OutputArrayName, const std::string &);
90 vtkGetMacro(OutputArrayName, std::string);
91
96 static ttkHelloWorld *New();
98
99protected:
105 ~ttkHelloWorld() override = default;
106
111 int FillInputPortInformation(int port, vtkInformation *info) override;
112
117 int FillOutputPortInformation(int port, vtkInformation *info) override;
118
123 int RequestData(vtkInformation *request,
124 vtkInformationVector **inputVector,
125 vtkInformationVector *outputVector) override;
126};
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::HelloWorld module.
static ttkHelloWorld * New()
~ttkHelloWorld() override=default