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 "vtkPassInputTypeAlgorithm.h" 00049 00050 class vtkGraph; 00051 class vtkTable; 00052 00053 class VTK_GRAPHICS_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm 00054 { 00055 public: 00056 static vtkProgrammableFilter *New(); 00057 vtkTypeMacro(vtkProgrammableFilter,vtkPassInputTypeAlgorithm); 00058 void PrintSelf(ostream& os, vtkIndent indent); 00059 00062 void SetExecuteMethod(void (*f)(void *), void *arg); 00063 00065 void SetExecuteMethodArgDelete(void (*f)(void *)); 00066 00071 vtkPolyData *GetPolyDataInput(); 00072 00074 vtkStructuredPoints *GetStructuredPointsInput(); 00075 00077 vtkStructuredGrid *GetStructuredGridInput(); 00078 00080 vtkUnstructuredGrid *GetUnstructuredGridInput(); 00081 00083 vtkRectilinearGrid *GetRectilinearGridInput(); 00084 00086 vtkGraph *GetGraphInput(); 00087 00088 00090 vtkTable *GetTableInput(); 00091 00093 00095 vtkSetMacro(CopyArrays, bool); 00096 vtkGetMacro(CopyArrays, bool); 00097 vtkBooleanMacro(CopyArrays, bool); 00099 00100 protected: 00101 vtkProgrammableFilter(); 00102 ~vtkProgrammableFilter(); 00103 00104 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00105 virtual int FillInputPortInformation(int port, vtkInformation* info); 00106 00107 void (*ExecuteMethod)(void *); //function to invoke 00108 void (*ExecuteMethodArgDelete)(void *); 00109 void *ExecuteMethodArg; 00110 00111 bool CopyArrays; 00112 00113 private: 00114 vtkProgrammableFilter(const vtkProgrammableFilter&); // Not implemented. 00115 void operator=(const vtkProgrammableFilter&); // Not implemented. 00116 }; 00117 00118 #endif 00119