|
ParaView
|
Evaluates a Python expression vtkPythonCalculator uses Python to calculate an expression. This filter depends heavily on the numpy and paraview.vtk modules. To use the parallel functions, mpi4py is also necessary. The expression is evaluated and the resulting scalar value or numpy array is added to the output as an array. See numpy and paraview.vtk documentation for the list of available functions. More...
#include <vtkPythonCalculator.h>


Public Member Functions | |
| virtual const char * | GetClassName () |
| virtual int | IsA (const char *type) |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| virtual void | SetArrayAssociation (int) |
| virtual int | GetArrayAssociation () |
| virtual void | SetCopyArrays (bool) |
| virtual bool | GetCopyArrays () |
| virtual void | CopyArraysOn () |
| virtual void | CopyArraysOff () |
| virtual void | SetExpression (const char *) |
| virtual char * | GetExpression () |
| virtual void | SetArrayName (const char *) |
| virtual char * | GetArrayName () |
Static Public Member Functions | |
| static int | IsTypeOf (const char *type) |
| static vtkPythonCalculator * | SafeDownCast (vtkObject *o) |
| static vtkPythonCalculator * | New () |
| static void | ExecuteScript (void *) |
Protected Member Functions | |
| vtkPythonCalculator () | |
| ~vtkPythonCalculator () | |
| void | Exec (const char *, const char *) |
| virtual int | FillOutputPortInformation (int port, vtkInformation *info) |
| virtual int | FillInputPortInformation (int port, vtkInformation *info) |
| virtual int | RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) |
Protected Attributes | |
| char * | Expression |
| char * | ArrayName |
| int | ArrayAssociation |
| bool | CopyArrays |
Evaluates a Python expression vtkPythonCalculator uses Python to calculate an expression. This filter depends heavily on the numpy and paraview.vtk modules. To use the parallel functions, mpi4py is also necessary. The expression is evaluated and the resulting scalar value or numpy array is added to the output as an array. See numpy and paraview.vtk documentation for the list of available functions.
This filter tries to make it easy for the user to write expressions by defining certain variables. The filter tries to assign each array to a variable of the same name. If the name of the array is not a valid Python variable, it has to be accessed through a dictionary called arrays (i.e. arrays['array_name']). The points can be accessed using the points variable.
Definition at line 37 of file vtkPythonCalculator.h.
| vtkPythonCalculator::vtkPythonCalculator | ( | ) | [protected] |
| vtkPythonCalculator::~vtkPythonCalculator | ( | ) | [protected] |
| virtual const char* vtkPythonCalculator::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkProgrammableFilter.
| static int vtkPythonCalculator::IsTypeOf | ( | const char * | type | ) | [static] |
Reimplemented from vtkProgrammableFilter.
| virtual int vtkPythonCalculator::IsA | ( | const char * | type | ) | [virtual] |
Reimplemented from vtkProgrammableFilter.
| static vtkPythonCalculator* vtkPythonCalculator::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkProgrammableFilter.
| void vtkPythonCalculator::PrintSelf | ( | ostream & | os, |
| vtkIndent | indent | ||
| ) | [virtual] |
Reimplemented from vtkProgrammableFilter.
| static vtkPythonCalculator* vtkPythonCalculator::New | ( | ) | [static] |
Reimplemented from vtkProgrammableFilter.
| virtual void vtkPythonCalculator::SetArrayAssociation | ( | int | ) | [virtual] |
Which field data to get the arrays from. See vtkDataObject::FieldAssociations for choices. The default is FIELD_ASSOCIATION_POINTS.
| virtual int vtkPythonCalculator::GetArrayAssociation | ( | ) | [virtual] |
Which field data to get the arrays from. See vtkDataObject::FieldAssociations for choices. The default is FIELD_ASSOCIATION_POINTS.
| virtual void vtkPythonCalculator::SetCopyArrays | ( | bool | ) | [virtual] |
Controls whether the input arrays are copied to the output. True by default.
Reimplemented from vtkProgrammableFilter.
| virtual bool vtkPythonCalculator::GetCopyArrays | ( | ) | [virtual] |
Controls whether the input arrays are copied to the output. True by default.
Reimplemented from vtkProgrammableFilter.
| virtual void vtkPythonCalculator::CopyArraysOn | ( | ) | [virtual] |
Controls whether the input arrays are copied to the output. True by default.
Reimplemented from vtkProgrammableFilter.
| virtual void vtkPythonCalculator::CopyArraysOff | ( | ) | [virtual] |
Controls whether the input arrays are copied to the output. True by default.
Reimplemented from vtkProgrammableFilter.
| virtual void vtkPythonCalculator::SetExpression | ( | const char * | ) | [virtual] |
Set the text of the python expression to execute. This expression must return a scalar value (which is converted to an array) or a numpy array.
| virtual char* vtkPythonCalculator::GetExpression | ( | ) | [virtual] |
Set the text of the python expression to execute. This expression must return a scalar value (which is converted to an array) or a numpy array.
| virtual void vtkPythonCalculator::SetArrayName | ( | const char * | ) | [virtual] |
Set the name of the output array.
| virtual char* vtkPythonCalculator::GetArrayName | ( | ) | [virtual] |
Set the name of the output array.
| static void vtkPythonCalculator::ExecuteScript | ( | void * | ) | [static] |
For internal use only.
| void vtkPythonCalculator::Exec | ( | const char * | , |
| const char * | |||
| ) | [protected] |
For internal use only.
| virtual int vtkPythonCalculator::FillOutputPortInformation | ( | int | port, |
| vtkInformation * | info | ||
| ) | [protected, virtual] |
Reimplemented from vtkProgrammableFilter.
| virtual int vtkPythonCalculator::FillInputPortInformation | ( | int | port, |
| vtkInformation * | info | ||
| ) | [protected, virtual] |
Reimplemented from vtkProgrammableFilter.
| virtual int vtkPythonCalculator::RequestDataObject | ( | vtkInformation * | request, |
| vtkInformationVector ** | inputVector, | ||
| vtkInformationVector * | outputVector | ||
| ) | [protected, virtual] |
Reimplemented from vtkProgrammableFilter.
char* vtkPythonCalculator::Expression [protected] |
Definition at line 95 of file vtkPythonCalculator.h.
char* vtkPythonCalculator::ArrayName [protected] |
Definition at line 96 of file vtkPythonCalculator.h.
int vtkPythonCalculator::ArrayAssociation [protected] |
Definition at line 97 of file vtkPythonCalculator.h.
bool vtkPythonCalculator::CopyArrays [protected] |
Reimplemented from vtkProgrammableFilter.
Definition at line 98 of file vtkPythonCalculator.h.
1.7.5.1