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