Executes a user supplied python script on its input dataset to produce an output dataset.
More...
#include <vtkPythonProgrammableFilter.h>
Inherits vtkProgrammableFilter.
|
virtual const char * | GetClassName () |
|
virtual int | IsA (const char *type) |
|
void | PrintSelf (ostream &os, vtkIndent indent) |
|
void | ClearParameters () |
| Clear all name-value parameters. More...
|
|
void | SetNumberOfInputPorts (int numberOfInputPorts) |
| Set the number of input ports This function is explicitly exposed to enable a vtkClientServerInterpreter to call it. More...
|
|
|
virtual void | SetScript (const char *) |
| Set the text of the python script to execute. More...
|
|
virtual char * | GetScript () |
| Set the text of the python script to execute. More...
|
|
|
virtual void | SetInformationScript (const char *) |
| Set the text of the python script to execute in RequestInformation(). More...
|
|
virtual char * | GetInformationScript () |
| Set the text of the python script to execute in RequestInformation(). More...
|
|
|
virtual void | SetUpdateExtentScript (const char *) |
| Set the text of the python script to execute in RequestUpdateExtent(). More...
|
|
virtual char * | GetUpdateExtentScript () |
| Set the text of the python script to execute in RequestUpdateExtent(). More...
|
|
|
void | SetParameterInternal (const char *name, const char *value) |
| Set a name-value parameter that will be available to the script when it is run. More...
|
|
void | SetParameter (const char *name, const char *value) |
| Set a name-value parameter that will be available to the script when it is run. More...
|
|
void | SetParameter (const char *name, int value) |
| Set a name-value parameter that will be available to the script when it is run. More...
|
|
void | SetParameter (const char *name, double value) |
| Set a name-value parameter that will be available to the script when it is run. More...
|
|
void | SetParameter (const char *name, double value1, double value2) |
| Set a name-value parameter that will be available to the script when it is run. More...
|
|
void | SetParameter (const char *name, double value1, double value2, double value3) |
| Set a name-value parameter that will be available to the script when it is run. More...
|
|
|
void | AddParameter (const char *name, const char *value) |
| To support repeatable-parameters. More...
|
|
void | ClearParameter (const char *name) |
| To support repeatable-parameters. More...
|
|
|
virtual void | SetOutputDataSetType (int) |
| Changes the output data set type. More...
|
|
virtual int | GetOutputDataSetType () |
| Changes the output data set type. More...
|
|
|
virtual void | SetPythonPath (const char *) |
| A semi-colon (;) separated list of directories to add to the python library search path. More...
|
|
virtual char * | GetPythonPath () |
| A semi-colon (;) separated list of directories to add to the python library search path. More...
|
|
|
| vtkPythonProgrammableFilter () |
|
| ~vtkPythonProgrammableFilter () |
|
void | Exec (const char *, const char *) |
| For internal use only. More...
|
|
virtual int | FillOutputPortInformation (int port, vtkInformation *info) |
|
virtual int | FillInputPortInformation (int port, vtkInformation *info) |
|
virtual int | RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) |
| Creates whatever output data set type is selected. More...
|
|
virtual int | RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) |
|
virtual int | RequestUpdateExtent (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) |
|
virtual int | ProcessRequest (vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) |
| We want to temporarilly cache request to be used in the Python code so we override this method to store request for later use since otherwise we won't have access to it. More...
|
|
Executes a user supplied python script on its input dataset to produce an output dataset.
This filter will execute a python script to produce an output dataset. An new interpretor is created at the beginning of RequestInformation(). The state of the python interpretor is preserved until the next execution of RequestInformation(). After the interpretor is creates the vtk module is imported with "from paraview import vtk".
Then the interpretor runs the InformationScript during RequestInformation(). This script is run in a python function called RequestInformation(). An argument named self that refers to the programmable filter is passed to the function. The interpretor also runs the Script during RequestData(). This script is run in a python function called RequestData(). An argument named self that refers to the programmable filter is passed to the function. Furthermore, a set of parameters passed with the SetParameter() call are defined as Python variables inside both scripts. This allows the developer to keep the scripts the same but change their behaviour using parameters.
Definition at line 49 of file vtkPythonProgrammableFilter.h.
§ Superclass
§ vtkPythonProgrammableFilter()
vtkPythonProgrammableFilter::vtkPythonProgrammableFilter |
( |
| ) |
|
|
protected |
§ ~vtkPythonProgrammableFilter()
vtkPythonProgrammableFilter::~vtkPythonProgrammableFilter |
( |
| ) |
|
|
protected |
§ GetClassName()
virtual const char* vtkPythonProgrammableFilter::GetClassName |
( |
| ) |
|
|
virtual |
§ IsTypeOf()
static int vtkPythonProgrammableFilter::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
§ IsA()
virtual int vtkPythonProgrammableFilter::IsA |
( |
const char * |
type | ) |
|
|
virtual |
§ SafeDownCast()
§ PrintSelf()
void vtkPythonProgrammableFilter::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
§ New()
§ SetScript()
virtual void vtkPythonProgrammableFilter::SetScript |
( |
const char * |
| ) |
|
|
virtual |
Set the text of the python script to execute.
§ GetScript()
virtual char* vtkPythonProgrammableFilter::GetScript |
( |
| ) |
|
|
virtual |
Set the text of the python script to execute.
§ SetInformationScript()
virtual void vtkPythonProgrammableFilter::SetInformationScript |
( |
const char * |
| ) |
|
|
virtual |
§ GetInformationScript()
virtual char* vtkPythonProgrammableFilter::GetInformationScript |
( |
| ) |
|
|
virtual |
§ SetUpdateExtentScript()
virtual void vtkPythonProgrammableFilter::SetUpdateExtentScript |
( |
const char * |
| ) |
|
|
virtual |
§ GetUpdateExtentScript()
virtual char* vtkPythonProgrammableFilter::GetUpdateExtentScript |
( |
| ) |
|
|
virtual |
§ SetParameterInternal()
void vtkPythonProgrammableFilter::SetParameterInternal |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
Set a name-value parameter that will be available to the script when it is run.
§ SetParameter() [1/5]
void vtkPythonProgrammableFilter::SetParameter |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
Set a name-value parameter that will be available to the script when it is run.
§ SetParameter() [2/5]
void vtkPythonProgrammableFilter::SetParameter |
( |
const char * |
name, |
|
|
int |
value |
|
) |
| |
Set a name-value parameter that will be available to the script when it is run.
§ SetParameter() [3/5]
void vtkPythonProgrammableFilter::SetParameter |
( |
const char * |
name, |
|
|
double |
value |
|
) |
| |
Set a name-value parameter that will be available to the script when it is run.
§ SetParameter() [4/5]
void vtkPythonProgrammableFilter::SetParameter |
( |
const char * |
name, |
|
|
double |
value1, |
|
|
double |
value2 |
|
) |
| |
Set a name-value parameter that will be available to the script when it is run.
§ SetParameter() [5/5]
void vtkPythonProgrammableFilter::SetParameter |
( |
const char * |
name, |
|
|
double |
value1, |
|
|
double |
value2, |
|
|
double |
value3 |
|
) |
| |
Set a name-value parameter that will be available to the script when it is run.
§ AddParameter()
void vtkPythonProgrammableFilter::AddParameter |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
To support repeatable-parameters.
§ ClearParameter()
void vtkPythonProgrammableFilter::ClearParameter |
( |
const char * |
name | ) |
|
To support repeatable-parameters.
§ ClearParameters()
void vtkPythonProgrammableFilter::ClearParameters |
( |
| ) |
|
Clear all name-value parameters.
§ ExecuteScript()
static void vtkPythonProgrammableFilter::ExecuteScript |
( |
void * |
| ) |
|
|
static |
§ SetOutputDataSetType()
virtual void vtkPythonProgrammableFilter::SetOutputDataSetType |
( |
int |
| ) |
|
|
virtual |
Changes the output data set type.
Allowable values are defined in vtkType.h
§ GetOutputDataSetType()
virtual int vtkPythonProgrammableFilter::GetOutputDataSetType |
( |
| ) |
|
|
virtual |
Changes the output data set type.
Allowable values are defined in vtkType.h
§ SetPythonPath()
virtual void vtkPythonProgrammableFilter::SetPythonPath |
( |
const char * |
| ) |
|
|
virtual |
A semi-colon (;) separated list of directories to add to the python library search path.
§ GetPythonPath()
virtual char* vtkPythonProgrammableFilter::GetPythonPath |
( |
| ) |
|
|
virtual |
A semi-colon (;) separated list of directories to add to the python library search path.
§ SetNumberOfInputPorts()
void vtkPythonProgrammableFilter::SetNumberOfInputPorts |
( |
int |
numberOfInputPorts | ) |
|
|
inline |
§ Exec()
void vtkPythonProgrammableFilter::Exec |
( |
const char * |
, |
|
|
const char * |
|
|
) |
| |
|
protected |
§ FillOutputPortInformation()
virtual int vtkPythonProgrammableFilter::FillOutputPortInformation |
( |
int |
port, |
|
|
vtkInformation * |
info |
|
) |
| |
|
protectedvirtual |
§ FillInputPortInformation()
virtual int vtkPythonProgrammableFilter::FillInputPortInformation |
( |
int |
port, |
|
|
vtkInformation * |
info |
|
) |
| |
|
protectedvirtual |
§ RequestDataObject()
virtual int vtkPythonProgrammableFilter::RequestDataObject |
( |
vtkInformation * |
request, |
|
|
vtkInformationVector ** |
inputVector, |
|
|
vtkInformationVector * |
outputVector |
|
) |
| |
|
protectedvirtual |
Creates whatever output data set type is selected.
§ RequestInformation()
virtual int vtkPythonProgrammableFilter::RequestInformation |
( |
vtkInformation * |
request, |
|
|
vtkInformationVector ** |
inputVector, |
|
|
vtkInformationVector * |
outputVector |
|
) |
| |
|
protectedvirtual |
§ RequestUpdateExtent()
virtual int vtkPythonProgrammableFilter::RequestUpdateExtent |
( |
vtkInformation * |
request, |
|
|
vtkInformationVector ** |
inputVector, |
|
|
vtkInformationVector * |
outputVector |
|
) |
| |
|
protectedvirtual |
§ ProcessRequest()
virtual int vtkPythonProgrammableFilter::ProcessRequest |
( |
vtkInformation * |
request, |
|
|
vtkInformationVector ** |
inInfo, |
|
|
vtkInformationVector * |
outInfo |
|
) |
| |
|
protectedvirtual |
We want to temporarilly cache request to be used in the Python code so we override this method to store request for later use since otherwise we won't have access to it.
§ Script
char* vtkPythonProgrammableFilter::Script |
|
protected |
§ InformationScript
char* vtkPythonProgrammableFilter::InformationScript |
|
protected |
§ UpdateExtentScript
char* vtkPythonProgrammableFilter::UpdateExtentScript |
|
protected |
§ PythonPath
char* vtkPythonProgrammableFilter::PythonPath |
|
protected |
§ OutputDataSetType
int vtkPythonProgrammableFilter::OutputDataSetType |
|
protected |
The documentation for this class was generated from the following file: