VTK  9.3.1
vtkProgrammableFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
31 #ifndef vtkProgrammableFilter_h
32 #define vtkProgrammableFilter_h
33 
34 #include "vtkFiltersProgrammableModule.h" // For export macro
36 
37 VTK_ABI_NAMESPACE_BEGIN
38 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm
39 {
40 public:
41  static vtkProgrammableFilter* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
54  typedef void (*ProgrammableMethodCallbackType)(void* arg);
55 
60  void SetExecuteMethod(void (*f)(void*), void* arg);
61 
65  void SetExecuteMethodArgDelete(void (*f)(void*));
66 
68 
74  vtkPolyData* GetPolyDataInput();
75  vtkStructuredPoints* GetStructuredPointsInput();
76  vtkStructuredGrid* GetStructuredGridInput();
77  vtkUnstructuredGrid* GetUnstructuredGridInput();
78  vtkRectilinearGrid* GetRectilinearGridInput();
79  vtkGraph* GetGraphInput();
80  vtkMolecule* GetMoleculeInput();
81  vtkTable* GetTableInput();
82  vtkHyperTreeGrid* GetHyperTreeGridInput();
84 
86 
90  vtkSetMacro(CopyArrays, bool);
91  vtkGetMacro(CopyArrays, bool);
92  vtkBooleanMacro(CopyArrays, bool);
94 
95 protected:
97  ~vtkProgrammableFilter() override;
98 
100  int FillInputPortInformation(int port, vtkInformation* info) override;
101 
102  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
103  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
105 
107 
108 private:
110  void operator=(const vtkProgrammableFilter&) = delete;
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
class describing a molecule
Definition: vtkMolecule.h:83
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
Base class for graph data types.
Definition: vtkGraph.h:280
a simple class to control print indentation
Definition: vtkIndent.h:28
dataset represents arbitrary combinations of all possible cell types
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:58
A subclass of ImageData.
topologically regular array of data
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
ProgrammableMethodCallbackType ExecuteMethodArgDelete
ProgrammableMethodCallbackType ExecuteMethod
a user-programmable filter
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()