VTK
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 vtkGraph;
47 class vtkTable;
48 
49 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm
50 {
51 public:
52  static vtkProgrammableFilter *New();
54  void PrintSelf(ostream& os, vtkIndent indent) VTK_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 
84  vtkPolyData *GetPolyDataInput();
85 
89  vtkStructuredPoints *GetStructuredPointsInput();
90 
94  vtkStructuredGrid *GetStructuredGridInput();
95 
99  vtkUnstructuredGrid *GetUnstructuredGridInput();
100 
104  vtkRectilinearGrid *GetRectilinearGridInput();
105 
109  vtkGraph *GetGraphInput();
110 
111 
115  vtkTable *GetTableInput();
116 
118 
122  vtkSetMacro(CopyArrays, bool);
123  vtkGetMacro(CopyArrays, bool);
124  vtkBooleanMacro(CopyArrays, bool);
126 
127 protected:
129  ~vtkProgrammableFilter() VTK_OVERRIDE;
130 
131  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
132  int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
133 
134  ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
135  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
136  void *ExecuteMethodArg;
137 
138  bool CopyArrays;
139 
140 private:
141  vtkProgrammableFilter(const vtkProgrammableFilter&) VTK_DELETE_FUNCTION;
142  void operator=(const vtkProgrammableFilter&) VTK_DELETE_FUNCTION;
143 };
144 
145 #endif
146 
147 // 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.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
Base class for graph data types.
Definition: vtkGraph.h:281
a simple class to control print indentation
Definition: vtkIndent.h:33
dataset represents arbitrary combinations of all possible cell types
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
a user-programmable filter
static vtkPassInputTypeAlgorithm * New()