00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkProgrammableFilter.h,v $ 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 00052 class VTK_GRAPHICS_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm 00053 { 00054 public: 00055 static vtkProgrammableFilter *New(); 00056 vtkTypeRevisionMacro(vtkProgrammableFilter,vtkPassInputTypeAlgorithm); 00057 00060 void SetExecuteMethod(void (*f)(void *), void *arg); 00061 00063 void SetExecuteMethodArgDelete(void (*f)(void *)); 00064 00069 vtkPolyData *GetPolyDataInput(); 00070 00072 vtkStructuredPoints *GetStructuredPointsInput(); 00073 00075 vtkStructuredGrid *GetStructuredGridInput(); 00076 00078 vtkUnstructuredGrid *GetUnstructuredGridInput(); 00079 00081 vtkRectilinearGrid *GetRectilinearGridInput(); 00082 00084 vtkGraph *GetGraphInput(); 00085 00086 protected: 00087 vtkProgrammableFilter(); 00088 ~vtkProgrammableFilter(); 00089 00090 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00091 virtual int FillInputPortInformation(int port, vtkInformation* info); 00092 00093 void (*ExecuteMethod)(void *); //function to invoke 00094 void (*ExecuteMethodArgDelete)(void *); 00095 void *ExecuteMethodArg; 00096 00097 private: 00098 vtkProgrammableFilter(const vtkProgrammableFilter&); // Not implemented. 00099 void operator=(const vtkProgrammableFilter&); // Not implemented. 00100 }; 00101 00102 #endif 00103