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