VTK  9.0.1
vtkProgrammableFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProgrammableFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
40 #ifndef vtkProgrammableFilter_h
41 #define vtkProgrammableFilter_h
42 
43 #include "vtkFiltersProgrammableModule.h" // For export macro
45 
46 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm
47 {
48 public:
49  static vtkProgrammableFilter* New();
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
62  typedef void (*ProgrammableMethodCallbackType)(void* arg);
63 
68  void SetExecuteMethod(void (*f)(void*), void* arg);
69 
73  void SetExecuteMethodArgDelete(void (*f)(void*));
74 
76 
82  vtkPolyData* GetPolyDataInput();
83  vtkStructuredPoints* GetStructuredPointsInput();
84  vtkStructuredGrid* GetStructuredGridInput();
85  vtkUnstructuredGrid* GetUnstructuredGridInput();
86  vtkRectilinearGrid* GetRectilinearGridInput();
87  vtkGraph* GetGraphInput();
88  vtkMolecule* GetMoleculeInput();
89  vtkTable* GetTableInput();
91 
93 
97  vtkSetMacro(CopyArrays, bool);
98  vtkGetMacro(CopyArrays, bool);
99  vtkBooleanMacro(CopyArrays, bool);
101 
102 protected:
104  ~vtkProgrammableFilter() override;
105 
107  int FillInputPortInformation(int port, vtkInformation* info) override;
108 
109  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
110  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
112 
114 
115 private:
117  void operator=(const vtkProgrammableFilter&) = delete;
118 };
119 
120 #endif
121 
122 // VTK-HeaderTest-Exclude: vtkProgrammableFilter.h
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:91
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
Base class for graph data types.
Definition: vtkGraph.h:289
a simple class to control print indentation
Definition: vtkIndent.h:33
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:62
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()