VTK
dox/Filters/Programmable/vtkProgrammableFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkProgrammableFilter.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00045 #ifndef __vtkProgrammableFilter_h
00046 #define __vtkProgrammableFilter_h
00047 
00048 #include "vtkFiltersProgrammableModule.h" // For export macro
00049 #include "vtkPassInputTypeAlgorithm.h"
00050 
00051 class vtkGraph;
00052 class vtkTable;
00053 
00054 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm
00055 {
00056 public:
00057   static vtkProgrammableFilter *New();
00058   vtkTypeMacro(vtkProgrammableFilter,vtkPassInputTypeAlgorithm);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00068   typedef void (*ProgrammableMethodCallbackType)(void *arg);
00069 
00072   void SetExecuteMethod(void (*f)(void *), void *arg);
00073 
00075   void SetExecuteMethodArgDelete(void (*f)(void *));
00076 
00081   vtkPolyData *GetPolyDataInput();
00082 
00084   vtkStructuredPoints *GetStructuredPointsInput();
00085 
00087   vtkStructuredGrid *GetStructuredGridInput();
00088 
00090   vtkUnstructuredGrid *GetUnstructuredGridInput();
00091 
00093   vtkRectilinearGrid *GetRectilinearGridInput();
00094 
00096   vtkGraph *GetGraphInput();
00097 
00098 
00100   vtkTable *GetTableInput();
00101 
00103 
00105   vtkSetMacro(CopyArrays, bool);
00106   vtkGetMacro(CopyArrays, bool);
00107   vtkBooleanMacro(CopyArrays, bool);
00109 
00110 protected:
00111   vtkProgrammableFilter();
00112   ~vtkProgrammableFilter();
00113 
00114   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00115   virtual int FillInputPortInformation(int port, vtkInformation* info);
00116 
00117   ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
00118   ProgrammableMethodCallbackType ExecuteMethodArgDelete;
00119   void *ExecuteMethodArg;
00120 
00121   bool CopyArrays;
00122 
00123 private:
00124   vtkProgrammableFilter(const vtkProgrammableFilter&);  // Not implemented.
00125   void operator=(const vtkProgrammableFilter&);  // Not implemented.
00126 };
00127 
00128 #endif
00129 
00130 // VTK-HeaderTest-Exclude: vtkProgrammableFilter.h