VTK  9.2.6
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 =========================================================================*/
43 #ifndef vtkProgrammableFilter_h
44 #define vtkProgrammableFilter_h
45 
46 #include "vtkFiltersProgrammableModule.h" // For export macro
48 
49 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm
50 {
51 public:
52  static vtkProgrammableFilter* New();
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
65  typedef void (*ProgrammableMethodCallbackType)(void* arg);
66 
71  void SetExecuteMethod(void (*f)(void*), void* arg);
72 
76  void SetExecuteMethodArgDelete(void (*f)(void*));
77 
79 
85  vtkPolyData* GetPolyDataInput();
86  vtkStructuredPoints* GetStructuredPointsInput();
87  vtkStructuredGrid* GetStructuredGridInput();
88  vtkUnstructuredGrid* GetUnstructuredGridInput();
89  vtkRectilinearGrid* GetRectilinearGridInput();
90  vtkGraph* GetGraphInput();
91  vtkMolecule* GetMoleculeInput();
92  vtkTable* GetTableInput();
93  vtkHyperTreeGrid* GetHyperTreeGridInput();
95 
97 
101  vtkSetMacro(CopyArrays, bool);
102  vtkGetMacro(CopyArrays, bool);
103  vtkBooleanMacro(CopyArrays, bool);
105 
106 protected:
108  ~vtkProgrammableFilter() override;
109 
111  int FillInputPortInformation(int port, vtkInformation* info) override;
112 
113  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
114  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
116 
118 
119 private:
121  void operator=(const vtkProgrammableFilter&) = delete;
122 };
123 
124 #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:94
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:90
Base class for graph data types.
Definition: vtkGraph.h:295
a simple class to control print indentation
Definition: vtkIndent.h:39
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:73
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()