|
VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPythonAlgorithm.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 =========================================================================*/ 00042 #ifndef vtkPythonAlgorithm_h 00043 #define vtkPythonAlgorithm_h 00044 00045 #include "vtkPython.h" // Must be first 00046 00047 #include "vtkFiltersPythonModule.h" // For export macro 00048 #include "vtkAlgorithm.h" 00049 00050 class vtkSmartPyObject; 00051 00052 class VTKFILTERSPYTHON_EXPORT vtkPythonAlgorithm : public vtkAlgorithm 00053 { 00054 public: 00055 static vtkPythonAlgorithm *New(); 00056 vtkTypeMacro(vtkPythonAlgorithm, vtkAlgorithm); 00057 void PrintSelf(ostream& os, vtkIndent indent); 00058 00064 void SetPythonObject(PyObject* obj); 00065 00068 virtual void SetNumberOfInputPorts(int n); 00069 00072 virtual void SetNumberOfOutputPorts(int n); 00073 00074 protected: 00075 vtkPythonAlgorithm(); 00076 ~vtkPythonAlgorithm(); 00077 00078 virtual int ProcessRequest(vtkInformation* request, 00079 vtkInformationVector** inInfo, 00080 vtkInformationVector* outInfo); 00081 virtual int FillInputPortInformation(int port, vtkInformation* info); 00082 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00083 00084 private: 00085 vtkPythonAlgorithm(const vtkPythonAlgorithm&); // Not implemented. 00086 void operator=(const vtkPythonAlgorithm&); // Not implemented. 00087 00088 int CheckResult(const char* method, const vtkSmartPyObject& res); 00089 00090 PyObject* Object; 00091 }; 00092 00093 #endif
1.8.0