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 00049 class VTK_GRAPHICS_EXPORT vtkProgrammableFilter : public vtkPassInputTypeAlgorithm 00050 { 00051 public: 00052 static vtkProgrammableFilter *New(); 00053 vtkTypeRevisionMacro(vtkProgrammableFilter,vtkPassInputTypeAlgorithm); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 00058 void SetExecuteMethod(void (*f)(void *), void *arg); 00059 00061 void SetExecuteMethodArgDelete(void (*f)(void *)); 00062 00067 vtkPolyData *GetPolyDataInput(); 00068 00070 vtkStructuredPoints *GetStructuredPointsInput(); 00071 00073 vtkStructuredGrid *GetStructuredGridInput(); 00074 00076 vtkUnstructuredGrid *GetUnstructuredGridInput(); 00077 00079 vtkRectilinearGrid *GetRectilinearGridInput(); 00080 00082 vtkGraph *GetGraphInput(); 00083 00085 00087 vtkSetMacro(CopyArrays, bool); 00088 vtkGetMacro(CopyArrays, bool); 00089 vtkBooleanMacro(CopyArrays, bool); 00091 00092 protected: 00093 vtkProgrammableFilter(); 00094 ~vtkProgrammableFilter(); 00095 00096 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00097 virtual int FillInputPortInformation(int port, vtkInformation* info); 00098 00099 void (*ExecuteMethod)(void *); //function to invoke 00100 void (*ExecuteMethodArgDelete)(void *); 00101 void *ExecuteMethodArg; 00102 00103 bool CopyArrays; 00104 00105 private: 00106 vtkProgrammableFilter(const vtkProgrammableFilter&); // Not implemented. 00107 void operator=(const vtkProgrammableFilter&); // Not implemented. 00108 }; 00109 00110 #endif 00111