|
ParaView
|
Executes a user supplied python script on its input dataset to produce an output dataset. More...
#include <vtkPythonProgrammableFilter.h>


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 53 of file vtkPythonProgrammableFilter.h.
| vtkPythonProgrammableFilter::vtkPythonProgrammableFilter | ( | ) | [protected] |
Returns the Python interp that should be used by all pipeline objects. The interp is created this first time this function is called and it is destroyed when vtkPVSessionBase invokes the ExitEvent. BTX
| vtkPythonProgrammableFilter::~vtkPythonProgrammableFilter | ( | ) | [protected] |
Returns the Python interp that should be used by all pipeline objects. The interp is created this first time this function is called and it is destroyed when vtkPVSessionBase invokes the ExitEvent. BTX
| virtual const char* vtkPythonProgrammableFilter::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkProgrammableFilter.
| static int vtkPythonProgrammableFilter::IsTypeOf | ( | const char * | type | ) | [static] |
Reimplemented from vtkProgrammableFilter.
| virtual int vtkPythonProgrammableFilter::IsA | ( | const char * | type | ) | [virtual] |
Reimplemented from vtkProgrammableFilter.
| static vtkPythonProgrammableFilter* vtkPythonProgrammableFilter::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkProgrammableFilter.
| void vtkPythonProgrammableFilter::PrintSelf | ( | ostream & | os, |
| vtkIndent | indent | ||
| ) | [virtual] |
Reimplemented from vtkProgrammableFilter.
| static vtkPythonProgrammableFilter* vtkPythonProgrammableFilter::New | ( | ) | [static] |
Reimplemented from vtkProgrammableFilter.
| virtual void vtkPythonProgrammableFilter::SetScript | ( | const char * | ) | [virtual] |
Set the text of the python script to execute.
| virtual char* vtkPythonProgrammableFilter::GetScript | ( | ) | [virtual] |
Set the text of the python script to execute.
| virtual void vtkPythonProgrammableFilter::SetInformationScript | ( | const char * | ) | [virtual] |
Set the text of the python script to execute in RequestInformation().
| virtual char* vtkPythonProgrammableFilter::GetInformationScript | ( | ) | [virtual] |
Set the text of the python script to execute in RequestInformation().
| virtual void vtkPythonProgrammableFilter::SetUpdateExtentScript | ( | const char * | ) | [virtual] |
Set the text of the python script to execute in RequestUpdateExtent().
| virtual char* vtkPythonProgrammableFilter::GetUpdateExtentScript | ( | ) | [virtual] |
Set the text of the python script to execute in RequestUpdateExtent().
| 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
| 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
| void vtkPythonProgrammableFilter::SetParameter | ( | const char * | name, |
| const int | value | ||
| ) |
Set a name-value parameter that will be available to the script when it is run
| void vtkPythonProgrammableFilter::SetParameter | ( | const char * | name, |
| const double | value | ||
| ) |
Set a name-value parameter that will be available to the script when it is run
| void vtkPythonProgrammableFilter::SetParameter | ( | const char * | name, |
| const double | value1, | ||
| const double | value2, | ||
| const double | value3 | ||
| ) |
Set a name-value parameter that will be available to the script when it is run
| void vtkPythonProgrammableFilter::ClearParameters | ( | ) |
Clear all name-value parameters
| static void vtkPythonProgrammableFilter::ExecuteScript | ( | void * | ) | [static] |
For internal use only.
| virtual void vtkPythonProgrammableFilter::SetOutputDataSetType | ( | int | ) | [virtual] |
Changes the output data set type. Allowable values are defined in vtkType.h
| virtual int vtkPythonProgrammableFilter::GetOutputDataSetType | ( | ) | [virtual] |
Changes the output data set type. Allowable values are defined in vtkType.h
| virtual void vtkPythonProgrammableFilter::SetPythonPath | ( | const char * | ) | [virtual] |
A semi-colon (;) separated list of directories to add to the python library search path.
| virtual char* vtkPythonProgrammableFilter::GetPythonPath | ( | ) | [virtual] |
A semi-colon (;) separated list of directories to add to the python library search path.
| static vtkPVPythonInterpretor* vtkPythonProgrammableFilter::GetGlobalPipelineInterpretor | ( | ) | [static] |
Returns the Python interp that should be used by all pipeline objects. The interp is created this first time this function is called and it is destroyed when vtkPVSessionBase invokes the ExitEvent. BTX
| void vtkPythonProgrammableFilter::Exec | ( | const char * | , |
| const char * | |||
| ) | [protected] |
For internal use only.
| virtual int vtkPythonProgrammableFilter::FillOutputPortInformation | ( | int | port, |
| vtkInformation * | info | ||
| ) | [protected, virtual] |
Reimplemented from vtkProgrammableFilter.
| virtual int vtkPythonProgrammableFilter::FillInputPortInformation | ( | int | port, |
| vtkInformation * | info | ||
| ) | [protected, virtual] |
Reimplemented from vtkProgrammableFilter.
| virtual int vtkPythonProgrammableFilter::RequestDataObject | ( | vtkInformation * | request, |
| vtkInformationVector ** | inputVector, | ||
| vtkInformationVector * | outputVector | ||
| ) | [protected, virtual] |
Creates whatever output data set type is selected.
Reimplemented from vtkProgrammableFilter.
| virtual int vtkPythonProgrammableFilter::RequestInformation | ( | vtkInformation * | request, |
| vtkInformationVector ** | inputVector, | ||
| vtkInformationVector * | outputVector | ||
| ) | [protected, virtual] |
Reimplemented from vtkProgrammableFilter.
| virtual int vtkPythonProgrammableFilter::RequestUpdateExtent | ( | vtkInformation * | request, |
| vtkInformationVector ** | inputVector, | ||
| vtkInformationVector * | outputVector | ||
| ) | [protected, virtual] |
Reimplemented from vtkProgrammableFilter.
friend class vtkPythonProgrammableFilterObserver [friend] |
Definition at line 158 of file vtkPythonProgrammableFilter.h.
char* vtkPythonProgrammableFilter::Script [protected] |
Definition at line 145 of file vtkPythonProgrammableFilter.h.
char* vtkPythonProgrammableFilter::InformationScript [protected] |
Definition at line 146 of file vtkPythonProgrammableFilter.h.
char* vtkPythonProgrammableFilter::UpdateExtentScript [protected] |
Definition at line 147 of file vtkPythonProgrammableFilter.h.
char* vtkPythonProgrammableFilter::PythonPath [protected] |
Definition at line 148 of file vtkPythonProgrammableFilter.h.
int vtkPythonProgrammableFilter::OutputDataSetType [protected] |
Definition at line 149 of file vtkPythonProgrammableFilter.h.
1.7.5.1