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=========================================================================*/
43#ifndef vtkPythonAlgorithm_h
44#define vtkPythonAlgorithm_h
45
46#include "vtkPython.h" // Must be first
47
48#include "vtkFiltersPythonModule.h" // For export macro
49#include "vtkAlgorithm.h"
50
51class vtkSmartPyObject;
52
53class VTKFILTERSPYTHON_EXPORT vtkPythonAlgorithm : public vtkAlgorithm
54{
55public:
58 void PrintSelf(ostream& os, vtkIndent indent);
59
68
73 virtual void SetNumberOfInputPorts(int n);
74
79 virtual void SetNumberOfOutputPorts(int n);
80
81protected:
84
85 virtual int ProcessRequest(vtkInformation* request,
86 vtkInformationVector** inInfo,
87 vtkInformationVector* outInfo);
90
91private:
92 vtkPythonAlgorithm(const vtkPythonAlgorithm&) VTK_DELETE_FUNCTION;
93 void operator=(const vtkPythonAlgorithm&) VTK_DELETE_FUNCTION;
94
95 int CheckResult(const char* method, const vtkSmartPyObject& res);
96
97 PyObject* Object;
98};
99
100#endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
algorithm that can be implemented in Python
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void SetNumberOfOutputPorts(int n)
Set the number of output ports provided by the algorithm.
static vtkPythonAlgorithm * New()
virtual void SetNumberOfInputPorts(int n)
Set the number of input ports used by the algorithm.
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
void SetPythonObject(PyObject *obj)
Specify the Python object to use to operate on the data.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
struct _object PyObject