VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
45 #ifndef __vtkProgrammableFilter_h
46 #define __vtkProgrammableFilter_h
47 
48 #include "vtkFiltersProgrammableModule.h" // For export macro
49 #include "vtkPassInputTypeAlgorithm.h"
50 
51 class vtkGraph;
52 class vtkTable;
53 
54 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm
55 {
56 public:
57  static vtkProgrammableFilter *New();
58  vtkTypeMacro(vtkProgrammableFilter,vtkPassInputTypeAlgorithm);
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
68  typedef void (*ProgrammableMethodCallbackType)(void *arg);
69 
72  void SetExecuteMethod(void (*f)(void *), void *arg);
73 
75  void SetExecuteMethodArgDelete(void (*f)(void *));
76 
81  vtkPolyData *GetPolyDataInput();
82 
84  vtkStructuredPoints *GetStructuredPointsInput();
85 
87  vtkStructuredGrid *GetStructuredGridInput();
88 
90  vtkUnstructuredGrid *GetUnstructuredGridInput();
91 
93  vtkRectilinearGrid *GetRectilinearGridInput();
94 
96  vtkGraph *GetGraphInput();
97 
98 
100  vtkTable *GetTableInput();
101 
103 
105  vtkSetMacro(CopyArrays, bool);
106  vtkGetMacro(CopyArrays, bool);
107  vtkBooleanMacro(CopyArrays, bool);
109 
110 protected:
113 
114  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
115  virtual int FillInputPortInformation(int port, vtkInformation* info);
116 
117  ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
118  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
120 
122 
123 private:
124  vtkProgrammableFilter(const vtkProgrammableFilter&); // Not implemented.
125  void operator=(const vtkProgrammableFilter&); // Not implemented.
126 };
127 
128 #endif
129 
130 // VTK-HeaderTest-Exclude: vtkProgrammableFilter.h
ProgrammableMethodCallbackType ExecuteMethodArgDelete
ProgrammableMethodCallbackType ExecuteMethod
a user-programmable filter