VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkPythonAlgorithm Class Reference

algorithm that can be implemented in Python More...

#include <vtkPythonAlgorithm.h>

Inheritance diagram for vtkPythonAlgorithm:
Inheritance graph
[legend]
Collaboration diagram for vtkPythonAlgorithm:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkPythonAlgorithmNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void SetPythonObject (PyObject *obj)
virtual void SetNumberOfInputPorts (int n)
virtual void SetNumberOfOutputPorts (int n)

Static Public Member Functions

static vtkPythonAlgorithmNew ()
static int IsTypeOf (const char *type)
static vtkPythonAlgorithmSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkPythonAlgorithm ()
 ~vtkPythonAlgorithm ()
virtual int ProcessRequest (vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
virtual int FillInputPortInformation (int port, vtkInformation *info)
virtual int FillOutputPortInformation (int port, vtkInformation *info)

Detailed Description

algorithm that can be implemented in Python

vtkPythonAlgorithm is an algorithm that calls a Python object to do the actual work. It defers the following methods to Python:

Python signature of these methods is as follows:

In addition, it calls an Initialize() method when setting the Python object, which allows the initialization of number of input and output ports etc.

See also:
vtkProgrammableFilter
Tests:
vtkPythonAlgorithm (Tests)

Definition at line 52 of file vtkPythonAlgorithm.h.


Member Typedef Documentation

Reimplemented from vtkAlgorithm.

Definition at line 56 of file vtkPythonAlgorithm.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkAlgorithm.

static int vtkPythonAlgorithm::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkAlgorithm.

virtual int vtkPythonAlgorithm::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkAlgorithm.

Reimplemented from vtkAlgorithm.

virtual vtkObjectBase* vtkPythonAlgorithm::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkAlgorithm.

Reimplemented from vtkAlgorithm.

void vtkPythonAlgorithm::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkAlgorithm.

Specify the Python object to use to operate on the data. A reference will be taken on the object. This will also invoke Initialize() on the Python object, which is commonly used to set the number of input and output ports as well as perform tasks commonly performed in the constructor of C++ algorithm subclass.

virtual void vtkPythonAlgorithm::SetNumberOfInputPorts ( int  n) [virtual]

Set the number of input ports used by the algorithm. This is made public so that it can be called from Python.

Reimplemented from vtkAlgorithm.

virtual void vtkPythonAlgorithm::SetNumberOfOutputPorts ( int  n) [virtual]

Set the number of output ports provided by the algorithm. This is made public so that it can be called from Python.

Reimplemented from vtkAlgorithm.

virtual int vtkPythonAlgorithm::ProcessRequest ( vtkInformation request,
vtkInformationVector **  inInfo,
vtkInformationVector outInfo 
) [protected, virtual]

Upstream/Downstream requests form the generalized interface through which executives invoke a algorithm's functionality. Upstream requests correspond to information flow from the algorithm's outputs to its inputs. Downstream requests correspond to information flow from the algorithm's inputs to its outputs. A downstream request is defined by the contents of the request information object. The input to the request is stored in the input information vector passed to ProcessRequest. The results of an downstream request are stored in the output information vector passed to ProcessRequest. An upstream request is defined by the contents of the request information object. The input to the request is stored in the output information vector passed to ProcessRequest. The results of an upstream request are stored in the input information vector passed to ProcessRequest. It returns the boolean status of the pipeline (false means failure).

Reimplemented from vtkAlgorithm.

virtual int vtkPythonAlgorithm::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkAlgorithm.

virtual int vtkPythonAlgorithm::FillOutputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the output port information objects for this algorithm. This is invoked by the first call to GetOutputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkAlgorithm.


The documentation for this class was generated from the following file: