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 
47 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm
48 {
49 public:
50  static vtkProgrammableFilter *New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
63  typedef void (*ProgrammableMethodCallbackType)(void *arg);
64 
69  void SetExecuteMethod(void (*f)(void *), void *arg);
70 
74  void SetExecuteMethodArgDelete(void (*f)(void *));
75 
77 
83  vtkPolyData *GetPolyDataInput();
84  vtkStructuredPoints *GetStructuredPointsInput();
85  vtkStructuredGrid *GetStructuredGridInput();
86  vtkUnstructuredGrid *GetUnstructuredGridInput();
87  vtkRectilinearGrid *GetRectilinearGridInput();
88  vtkGraph *GetGraphInput();
89  vtkMolecule *GetMoleculeInput();
90  vtkTable *GetTableInput();
92 
94 
98  vtkSetMacro(CopyArrays, bool);
99  vtkGetMacro(CopyArrays, bool);
100  vtkBooleanMacro(CopyArrays, bool);
102 
103 protected:
105  ~vtkProgrammableFilter() override;
106 
108  int FillInputPortInformation(int port, vtkInformation* info) override;
109 
110  ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
111  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
113 
115 
116 private:
118  void operator=(const vtkProgrammableFilter&) = delete;
119 };
120 
121 #endif
122 
123 // VTK-HeaderTest-Exclude: vtkProgrammableFilter.h
vtkStructuredPoints
A subclass of ImageData.
Definition: vtkStructuredPoints.h:36
vtkProgrammableFilter
a user-programmable filter
Definition: vtkProgrammableFilter.h:47
vtkPassInputTypeAlgorithm.h
vtkProgrammableFilter::ExecuteMethodArgDelete
ProgrammableMethodCallbackType ExecuteMethodArgDelete
Definition: vtkProgrammableFilter.h:111
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:50
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:57
vtkPassInputTypeAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
Definition: vtkX3D.h:447
vtkPassInputTypeAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Definition: vtkPassInputTypeAlgorithm.h:175
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMolecule
class describing a molecule
Definition: vtkMolecule.h:91
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkPassInputTypeAlgorithm::New
static vtkPassInputTypeAlgorithm * New()
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
vtkPassInputTypeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProgrammableFilter::CopyArrays
bool CopyArrays
Definition: vtkProgrammableFilter.h:114
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:81
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:281
vtkProgrammableFilter::ExecuteMethodArg
void * ExecuteMethodArg
Definition: vtkProgrammableFilter.h:112
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:51
vtkProgrammableFilter::ExecuteMethod
ProgrammableMethodCallbackType ExecuteMethod
Definition: vtkProgrammableFilter.h:110