VTK  9.2.6
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=========================================================================*/
44#ifndef vtkPythonAlgorithm_h
45#define vtkPythonAlgorithm_h
46#if !defined(__VTK_WRAP__) || defined(__VTK_WRAP_HIERARCHY__) || defined(__VTK_WRAP_PYTHON__)
47
48#include "vtkPython.h" // Must be first
49
50#include "vtkAlgorithm.h"
51#include "vtkFiltersPythonModule.h" // For export macro
52
53class vtkSmartPyObject;
54
55class VTKFILTERSPYTHON_EXPORT vtkPythonAlgorithm : public vtkAlgorithm
56{
57public:
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
70
75 void SetNumberOfInputPorts(int n) override;
76
81 void SetNumberOfOutputPorts(int n) override;
82
83protected:
86
88 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
89 int FillInputPortInformation(int port, vtkInformation* info) override;
90 int FillOutputPortInformation(int port, vtkInformation* info) override;
91
92private:
94 void operator=(const vtkPythonAlgorithm&) = delete;
95
96 int CheckResult(const char* method, const vtkSmartPyObject& res);
97
98 PyObject* Object;
99};
100
101#endif
102#endif
Superclass for all sources, filters, and sinks in VTK.
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
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...
int vtkTypeBool
Definition vtkABI.h:69
struct _object PyObject