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 
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
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
vtkgl::obj
GLsizei GLsizei GLuint * obj
Definition: vtkgl.h:11994
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:62
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkPythonAlgorithm::vtkPythonAlgorithm
vtkPythonAlgorithm()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkgl::n
GLclampd n
Definition: vtkgl.h:14370
vtkPythonAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
PyObject
struct _object PyObject
Definition: vtkMatplotlibMathTextUtilities.h:37
vtkPythonAlgorithm::New
static vtkPythonAlgorithm * New()
vtkAlgorithm.h
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkSmartPyObject
Definition: vtkSmartPyObject.h:29
vtkPythonAlgorithm::ProcessRequest
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkgl::res
GLuint res
Definition: vtkgl.h:16902
vtkFiltersPythonModule.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPythonAlgorithm::SetNumberOfOutputPorts
virtual void SetNumberOfOutputPorts(int n)
vtkPythonAlgorithm::SetNumberOfInputPorts
virtual void SetNumberOfInputPorts(int n)
vtkPythonAlgorithm
algorithm that can be implemented in Python
Definition: vtkPythonAlgorithm.h:53
VTKFILTERSPYTHON_EXPORT
#define VTKFILTERSPYTHON_EXPORT
Definition: vtkFiltersPythonModule.h:15
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkPythonAlgorithm::~vtkPythonAlgorithm
~vtkPythonAlgorithm()
vtkPythonAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkPythonAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkPythonAlgorithm::SetPythonObject
void SetPythonObject(PyObject *obj)