VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkProgrammableAttributeDataFilter.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 =========================================================================*/ 00079 #ifndef __vtkProgrammableAttributeDataFilter_h 00080 #define __vtkProgrammableAttributeDataFilter_h 00081 00082 #include "vtkFiltersProgrammableModule.h" // For export macro 00083 #include "vtkDataSetAlgorithm.h" 00084 00085 class vtkDataSetCollection; 00086 00087 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetAlgorithm 00088 { 00089 public: 00090 static vtkProgrammableAttributeDataFilter *New(); 00091 vtkTypeMacro(vtkProgrammableAttributeDataFilter,vtkDataSetAlgorithm); 00092 void PrintSelf(ostream& os, vtkIndent indent); 00093 00095 void AddInput(vtkDataSet *in); 00096 00098 void RemoveInput(vtkDataSet *in); 00099 00101 vtkDataSetCollection *GetInputList() {return this->InputList;}; 00102 00110 typedef void (*ProgrammableMethodCallbackType)(void *arg); 00111 00114 void SetExecuteMethod(void (*f)(void *), void *arg); 00115 00117 void SetExecuteMethodArgDelete(void (*f)(void *)); 00118 00119 protected: 00120 vtkProgrammableAttributeDataFilter(); 00121 ~vtkProgrammableAttributeDataFilter(); 00122 00123 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00124 vtkDataSetCollection *InputList; //list of datasets to process 00125 ProgrammableMethodCallbackType ExecuteMethod; //function to invoke 00126 ProgrammableMethodCallbackType ExecuteMethodArgDelete; 00127 void *ExecuteMethodArg; 00128 00129 virtual void ReportReferences(vtkGarbageCollector*); 00130 00131 private: 00132 // hide the superclass' AddInput() from the user and the compiler 00133 void AddInput(vtkDataObject *) 00134 { vtkErrorMacro( << "AddInput() must be called with a vtkDataSet not a vtkDataObject."); }; 00135 00136 private: 00137 vtkProgrammableAttributeDataFilter(const vtkProgrammableAttributeDataFilter&); // Not implemented. 00138 void operator=(const vtkProgrammableAttributeDataFilter&); // Not implemented. 00139 }; 00140 00141 #endif 00142 00143