VTK
vtkPythonAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPythonAlgorithm.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
42 #ifndef vtkPythonAlgorithm_h
43 #define vtkPythonAlgorithm_h
44 
45 #include "vtkPython.h" // Must be first
46 
47 #include "vtkFiltersPythonModule.h" // For export macro
48 #include "vtkAlgorithm.h"
49 
50 class vtkSmartPyObject;
51 
52 class VTKFILTERSPYTHON_EXPORT vtkPythonAlgorithm : public vtkAlgorithm
53 {
54 public:
55  static vtkPythonAlgorithm *New();
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
64  void SetPythonObject(PyObject* obj);
65 
68  virtual void SetNumberOfInputPorts(int n);
69 
72  virtual void SetNumberOfOutputPorts(int n);
73 
74 protected:
77 
78  virtual int ProcessRequest(vtkInformation* request,
79  vtkInformationVector** inInfo,
80  vtkInformationVector* outInfo);
83 
84 private:
85  vtkPythonAlgorithm(const vtkPythonAlgorithm&); // Not implemented.
86  void operator=(const vtkPythonAlgorithm&); // Not implemented.
87 
88  int CheckResult(const char* method, const vtkSmartPyObject& res);
89 
90  PyObject* Object;
91 };
92 
93 #endif
Store vtkAlgorithm input/output information.
virtual void SetNumberOfInputPorts(int n)
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
virtual void SetNumberOfOutputPorts(int n)
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
virtual int FillOutputPortInformation(int port, vtkInformation *info)
a simple class to control print indentation
Definition: vtkIndent.h:38
algorithm that can be implemented in Python
virtual int FillInputPortInformation(int port, vtkInformation *info)
struct _object PyObject
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)