Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkPythonCalculator Class Reference

Evaluates a Python expression vtkPythonCalculator uses Python to calculate an expression. More...

#include <vtkPythonCalculator.h>

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

Public Types

typedef vtkProgrammableFilter Superclass
 
- Public Types inherited from vtkProgrammableFilter
typedef vtkPassInputTypeAlgorithm Superclass
 
typedef void(* ProgrammableMethodCallbackType) (void *arg)
 
- Public Types inherited from vtkPassInputTypeAlgorithm
typedef vtkAlgorithm Superclass
 
- Public Types inherited from vtkAlgorithm
enum  DesiredOutputPrecision
 
enum  DesiredOutputPrecision
 
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetArrayAssociation (int)
 Which field data to get the arrays from. More...
 
virtual int GetArrayAssociation ()
 Which field data to get the arrays from. More...
 
virtual void SetExpression (std::string)
 Set the text of the python expression to execute. More...
 
virtual std::string GetExpression ()
 Set the text of the python expression to execute. More...
 
virtual void SetMultilineExpression (std::string)
 Set the text of the python multiline expression. More...
 
virtual std::string GetMultilineExpression ()
 Set the text of the python multiline expression. More...
 
virtual void SetArrayName (const char *)
 Set the name of the output array. More...
 
virtual char * GetArrayName ()
 Set the name of the output array. More...
 
virtual int GetResultArrayType ()
 Type of the result array. More...
 
virtual void SetResultArrayType (int)
 Type of the result array. More...
 
virtual bool GetUseMultilineExpression ()
 If true, executes MultilineExpression, which is a multiline string representing a Python script, ending by a return statement. More...
 
virtual void SetUseMultilineExpression (bool)
 If true, executes MultilineExpression, which is a multiline string representing a Python script, ending by a return statement. More...
 
- Public Member Functions inherited from vtkProgrammableFilter
vtkProgrammableFilterNewInstance () const
 
void SetExecuteMethod (void(*f)(void *), void *arg)
 
void SetExecuteMethodArgDelete (void(*f)(void *))
 
vtkPolyDataGetPolyDataInput ()
 
vtkStructuredPointsGetStructuredPointsInput ()
 
vtkStructuredGridGetStructuredGridInput ()
 
vtkUnstructuredGridGetUnstructuredGridInput ()
 
vtkRectilinearGridGetRectilinearGridInput ()
 
vtkGraphGetGraphInput ()
 
vtkTableGetTableInput ()
 
virtual void SetCopyArrays (bool)
 
virtual bool GetCopyArrays ()
 
virtual void CopyArraysOn ()
 
virtual void CopyArraysOff ()
 
virtual void SetCopyArrays (bool)
 
virtual bool GetCopyArrays ()
 
virtual void CopyArraysOn ()
 
virtual void CopyArraysOff ()
 
- Public Member Functions inherited from vtkPassInputTypeAlgorithm
vtkPassInputTypeAlgorithmNewInstance () const
 
vtkPolyDataGetPolyDataOutput ()
 
vtkStructuredPointsGetStructuredPointsOutput ()
 
vtkImageDataGetImageDataOutput ()
 
vtkStructuredGridGetStructuredGridOutput ()
 
vtkUnstructuredGridGetUnstructuredGridOutput ()
 
vtkRectilinearGridGetRectilinearGridOutput ()
 
vtkTableGetTableOutput ()
 
vtkGraphGetGraphOutput ()
 
vtkDataObjectGetInput ()
 
vtkDataObjectGetOutput ()
 
vtkDataObjectGetOutput (int)
 
void SetInputData (vtkDataObject *)
 
void SetInputData (int, vtkDataObject *)
 
void AddInputData (vtkDataObject *)
 
void AddInputData (int, vtkDataObject *)
 
virtual int ProcessRequest (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
vtkDataObjectGetOutput ()
 
vtkDataObjectGetOutput (int)
 
void SetInputData (vtkDataObject *)
 
void SetInputData (int, vtkDataObject *)
 
void AddInputData (vtkDataObject *)
 
void AddInputData (int, vtkDataObject *)
 
virtual int ProcessRequest (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
- Public Member Functions inherited from vtkAlgorithm
vtkAlgorithmNewInstance () const
 
int HasExecutive ()
 
vtkExecutiveGetExecutive ()
 
virtual void SetExecutive (vtkExecutive *executive)
 
virtual int ModifyRequest (vtkInformation *request, int when)
 
vtkInformationGetInputPortInformation (int port)
 
vtkInformationGetOutputPortInformation (int port)
 
int GetNumberOfInputPorts ()
 
int GetNumberOfOutputPorts ()
 
void UpdateProgress (double amount)
 
vtkInformationGetInputArrayInformation (int idx)
 
void RemoveAllInputs ()
 
vtkDataObjectGetOutputDataObject (int port)
 
virtual void RemoveInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void RemoveInputConnection (int port, int idx)
 
virtual void RemoveAllInputConnections (int port)
 
int GetNumberOfInputConnections (int port)
 
int GetTotalNumberOfInputConnections ()
 
vtkAlgorithmOutputGetInputConnection (int port, int index)
 
vtkAlgorithmGetInputAlgorithm (int port, int index, int &algPort)
 
vtkAlgorithmGetInputAlgorithm (int port, int index)
 
vtkExecutiveGetInputExecutive (int port, int index)
 
vtkInformationGetInputInformation (int port, int index)
 
vtkInformationGetOutputInformation (int port)
 
virtual int Update (int port, vtkInformationVector *requests)
 
virtual int Update (vtkInformation *requests)
 
virtual int UpdateExtent (const int extents[6])
 
virtual void UpdateInformation ()
 
virtual void UpdateDataObject ()
 
virtual void PropagateUpdateExtent ()
 
virtual void UpdateWholeExtent ()
 
void ConvertTotalInputToPortConnection (int ind, int &port, int &conn)
 
int SetUpdateExtentToWholeExtent (int port)
 
int SetUpdateExtentToWholeExtent ()
 
void SetUpdateExtent (int port, int extent[6])
 
void SetUpdateExtent (int extent[6])
 
int ProcessRequest (vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
 
virtual int ComputePipelineMTime (vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime)
 
virtual vtkInformationGetInformation ()
 
virtual void SetInformation (vtkInformation *)
 
void Register (vtkObjectBase *o) VTK_OVERRIDE
 
void UnRegister (vtkObjectBase *o) VTK_OVERRIDE
 
virtual void SetAbortExecute (int)
 
virtual int GetAbortExecute ()
 
virtual void AbortExecuteOn ()
 
virtual void AbortExecuteOff ()
 
virtual void SetProgress (double)
 
virtual double GetProgress ()
 
void SetProgressText (const char *ptext)
 
virtual char * GetProgressText ()
 
virtual unsigned long GetErrorCode ()
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
 
virtual void SetInputArrayToProcess (int idx, vtkInformation *info)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
 
vtkDataObjectGetInputDataObject (int port, int connection)
 
virtual void SetInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void SetInputConnection (vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (vtkAlgorithmOutput *input)
 
virtual void SetInputDataObject (int port, vtkDataObject *data)
 
virtual void SetInputDataObject (vtkDataObject *data)
 
virtual void AddInputDataObject (int port, vtkDataObject *data)
 
virtual void AddInputDataObject (vtkDataObject *data)
 
vtkAlgorithmOutputGetOutputPort (int index)
 
vtkAlgorithmOutputGetOutputPort ()
 
vtkAlgorithmGetInputAlgorithm ()
 
vtkExecutiveGetInputExecutive ()
 
vtkInformationGetInputInformation ()
 
virtual void Update (int port)
 
virtual void Update ()
 
virtual int UpdatePiece (int piece, int numPieces, int ghostLevels, const int extents[6]=0)
 
virtual int UpdateTimeStep (double time, int piece=-1, int numPieces=1, int ghostLevels=0, const int extents[6]=0)
 
virtual void SetReleaseDataFlag (int)
 
virtual int GetReleaseDataFlag ()
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, vtkDataObject *output)
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType)
 
void SetUpdateExtent (int port, int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int piece, int numPieces, int ghostLevel)
 
intGetUpdateExtent ()
 
intGetUpdateExtent (int port)
 
void GetUpdateExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int extent[6])
 
void GetUpdateExtent (int port, int extent[6])
 
int GetUpdatePiece ()
 
int GetUpdatePiece (int port)
 
int GetUpdateNumberOfPieces ()
 
int GetUpdateNumberOfPieces (int port)
 
int GetUpdateGhostLevel ()
 
int GetUpdateGhostLevel (int port)
 
void SetProgressObserver (vtkProgressObserver *)
 
virtual vtkProgressObserverGetProgressObserver ()
 
int ProcessRequest (vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
 
virtual int ComputePipelineMTime (vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime)
 
virtual vtkInformationGetInformation ()
 
virtual void SetInformation (vtkInformation *)
 
void Register (vtkObjectBase *o) VTK_OVERRIDE
 
void UnRegister (vtkObjectBase *o) VTK_OVERRIDE
 
virtual void SetAbortExecute (int)
 
virtual int GetAbortExecute ()
 
virtual void AbortExecuteOn ()
 
virtual void AbortExecuteOff ()
 
virtual void SetProgress (double)
 
virtual double GetProgress ()
 
void SetProgressText (const char *ptext)
 
virtual char * GetProgressText ()
 
virtual unsigned long GetErrorCode ()
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
 
virtual void SetInputArrayToProcess (int idx, vtkInformation *info)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
 
vtkDataObjectGetInputDataObject (int port, int connection)
 
virtual void SetInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void SetInputConnection (vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (vtkAlgorithmOutput *input)
 
virtual void SetInputDataObject (int port, vtkDataObject *data)
 
virtual void SetInputDataObject (vtkDataObject *data)
 
virtual void AddInputDataObject (int port, vtkDataObject *data)
 
virtual void AddInputDataObject (vtkDataObject *data)
 
vtkAlgorithmOutputGetOutputPort (int index)
 
vtkAlgorithmOutputGetOutputPort ()
 
vtkAlgorithmGetInputAlgorithm ()
 
vtkExecutiveGetInputExecutive ()
 
vtkInformationGetInputInformation ()
 
virtual void Update (int port)
 
virtual void Update ()
 
virtual int UpdatePiece (int piece, int numPieces, int ghostLevels, const int extents[6]=0)
 
virtual int UpdateTimeStep (double time, int piece=-1, int numPieces=1, int ghostLevels=0, const int extents[6]=0)
 
virtual void SetReleaseDataFlag (int)
 
virtual int GetReleaseDataFlag ()
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, vtkDataObject *output)
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType)
 
void SetUpdateExtent (int port, int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int piece, int numPieces, int ghostLevel)
 
intGetUpdateExtent ()
 
intGetUpdateExtent (int port)
 
void GetUpdateExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int extent[6])
 
void GetUpdateExtent (int port, int extent[6])
 
int GetUpdatePiece ()
 
int GetUpdatePiece (int port)
 
int GetUpdateNumberOfPieces ()
 
int GetUpdateNumberOfPieces (int port)
 
int GetUpdateGhostLevel ()
 
int GetUpdateGhostLevel (int port)
 
void SetProgressObserver (vtkProgressObserver *)
 
virtual vtkProgressObserverGetProgressObserver ()
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPythonCalculatorSafeDownCast (vtkObject *o)
 
static vtkPythonCalculatorNew ()
 
static void ExecuteScript (void *)
 For internal use only. More...
 
- Static Public Member Functions inherited from vtkProgrammableFilter
static vtkProgrammableFilterNew ()
 
static int IsTypeOf (const char *type)
 
static vtkProgrammableFilterSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkPassInputTypeAlgorithm
static vtkPassInputTypeAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPassInputTypeAlgorithmSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAlgorithm
static vtkAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static vtkAlgorithmSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKeyINPUT_IS_OPTIONAL ()
 
static vtkInformationIntegerKeyINPUT_IS_REPEATABLE ()
 
static vtkInformationInformationVectorKeyINPUT_REQUIRED_FIELDS ()
 
static vtkInformationStringVectorKeyINPUT_REQUIRED_DATA_TYPE ()
 
static vtkInformationInformationVectorKeyINPUT_ARRAYS_TO_PROCESS ()
 
static vtkInformationIntegerKeyINPUT_PORT ()
 
static vtkInformationIntegerKeyINPUT_CONNECTION ()
 
static vtkInformationIntegerKeyCAN_PRODUCE_SUB_EXTENT ()
 
static vtkInformationIntegerKeyCAN_HANDLE_PIECE_REQUEST ()
 
static void SetDefaultExecutivePrototype (vtkExecutive *proto)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkPythonCalculator ()
 
 ~vtkPythonCalculator () override
 
void Exec (const std::string &)
 For internal use only. More...
 
int FillOutputPortInformation (int port, vtkInformation *info) override
 
int FillInputPortInformation (int port, vtkInformation *info) override
 
int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 
int RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 
- Protected Member Functions inherited from vtkProgrammableFilter
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkProgrammableFilter ()
 
 ~vtkProgrammableFilter ()
 
- Protected Member Functions inherited from vtkPassInputTypeAlgorithm
 vtkPassInputTypeAlgorithm ()
 
 ~vtkPassInputTypeAlgorithm ()
 
virtual int RequestUpdateTime (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestUpdateTimeDependentInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
vtkDataObjectGetInput (int port)
 
virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
- Protected Member Functions inherited from vtkAlgorithm
 vtkAlgorithm ()
 
 ~vtkAlgorithm ()
 
virtual void SetNumberOfInputPorts (int n)
 
virtual void SetNumberOfOutputPorts (int n)
 
int InputPortIndexInRange (int index, const char *action)
 
int OutputPortIndexInRange (int index, const char *action)
 
int GetInputArrayAssociation (int idx, vtkInformationVector **inputVector)
 
virtual vtkExecutiveCreateDefaultExecutive ()
 
void ReportReferences (vtkGarbageCollector *) VTK_OVERRIDE
 
virtual void SetNumberOfInputConnections (int port, int n)
 
int GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkInformationGetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector)
 
virtual void SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input)
 
void SetInputDataInternal (int port, vtkDataObject *input)
 
void AddInputDataInternal (int port, vtkDataObject *input)
 
int GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkInformationGetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector)
 
virtual void SetErrorCode (unsigned long)
 
virtual void SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input)
 
void SetInputDataInternal (int port, vtkDataObject *input)
 
void AddInputDataInternal (int port, vtkDataObject *input)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

std::string Expression
 
std::string MultilineExpression
 
bool UseMultilineExpression = false
 
char * ArrayName = nullptr
 
int ArrayAssociation = vtkDataObject::FIELD_ASSOCIATION_POINTS
 
int ResultArrayType = VTK_DOUBLE
 
- Protected Attributes inherited from vtkProgrammableFilter
ProgrammableMethodCallbackType ExecuteMethod
 
ProgrammableMethodCallbackType ExecuteMethodArgDelete
 
void * ExecuteMethodArg
 
bool CopyArrays
 
- Protected Attributes inherited from vtkAlgorithm
vtkInformationInformation
 
double Progress
 
char * ProgressText
 
vtkProgressObserverProgressObserver
 
unsigned long ErrorCode
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Public Attributes inherited from vtkAlgorithm
 SINGLE_PRECISION
 
 DOUBLE_PRECISION
 
 DEFAULT_PRECISION
 
int AbortExecute
 
- Static Protected Member Functions inherited from vtkAlgorithm
static vtkInformationIntegerKeyPORT_REQUIREMENTS_FILLED ()
 
- Static Protected Attributes inherited from vtkAlgorithm
static vtkExecutiveDefaultExecutivePrototype
 

Detailed Description

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 29 of file vtkPythonCalculator.h.

Member Typedef Documentation

◆ Superclass

Definition at line 32 of file vtkPythonCalculator.h.

Constructor & Destructor Documentation

◆ vtkPythonCalculator()

vtkPythonCalculator::vtkPythonCalculator ( )
protected

◆ ~vtkPythonCalculator()

vtkPythonCalculator::~vtkPythonCalculator ( )
overrideprotected

Member Function Documentation

◆ GetClassName()

virtual const char* vtkPythonCalculator::GetClassName ( )
virtual

◆ IsTypeOf()

static int vtkPythonCalculator::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkPythonCalculator::IsA ( const char *  type)
virtual

Reimplemented from vtkProgrammableFilter.

◆ SafeDownCast()

static vtkPythonCalculator* vtkPythonCalculator::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkPythonCalculator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkProgrammableFilter.

◆ New()

static vtkPythonCalculator* vtkPythonCalculator::New ( )
static

◆ SetArrayAssociation()

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.

◆ GetArrayAssociation()

virtual int vtkPythonCalculator::GetArrayAssociation ( )
virtual

Which field data to get the arrays from.

See vtkDataObject::FieldAssociations for choices. The default is FIELD_ASSOCIATION_POINTS.

◆ SetExpression()

virtual void vtkPythonCalculator::SetExpression ( std::string  )
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.

◆ GetExpression()

virtual std::string 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.

◆ SetMultilineExpression()

virtual void vtkPythonCalculator::SetMultilineExpression ( std::string  )
virtual

Set the text of the python multiline expression.

The expression must use an explicit return statement for the result scalar value or numpy array.

◆ GetMultilineExpression()

virtual std::string vtkPythonCalculator::GetMultilineExpression ( )
virtual

Set the text of the python multiline expression.

The expression must use an explicit return statement for the result scalar value or numpy array.

◆ SetArrayName()

virtual void vtkPythonCalculator::SetArrayName ( const char *  )
virtual

Set the name of the output array.

◆ GetArrayName()

virtual char* vtkPythonCalculator::GetArrayName ( )
virtual

Set the name of the output array.

◆ GetResultArrayType()

virtual int vtkPythonCalculator::GetResultArrayType ( )
virtual

Type of the result array.

Initial value is VTK_DOUBLE.

◆ SetResultArrayType()

virtual void vtkPythonCalculator::SetResultArrayType ( int  )
virtual

Type of the result array.

Initial value is VTK_DOUBLE.

◆ GetUseMultilineExpression()

virtual bool vtkPythonCalculator::GetUseMultilineExpression ( )
virtual

If true, executes MultilineExpression, which is a multiline string representing a Python script, ending by a return statement.

Otherwise, evaluates Expression, a python expression. Initial value is false.

◆ SetUseMultilineExpression()

virtual void vtkPythonCalculator::SetUseMultilineExpression ( bool  )
virtual

If true, executes MultilineExpression, which is a multiline string representing a Python script, ending by a return statement.

Otherwise, evaluates Expression, a python expression. Initial value is false.

◆ ExecuteScript()

static void vtkPythonCalculator::ExecuteScript ( void *  )
static

For internal use only.

◆ Exec()

void vtkPythonCalculator::Exec ( const std::string )
protected

For internal use only.

◆ FillOutputPortInformation()

int vtkPythonCalculator::FillOutputPortInformation ( int  port,
vtkInformation info 
)
overrideprotectedvirtual

Reimplemented from vtkPassInputTypeAlgorithm.

◆ FillInputPortInformation()

int vtkPythonCalculator::FillInputPortInformation ( int  port,
vtkInformation info 
)
overrideprotectedvirtual

Reimplemented from vtkProgrammableFilter.

◆ RequestData()

int vtkPythonCalculator::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
)
overrideprotectedvirtual

Reimplemented from vtkProgrammableFilter.

◆ RequestDataObject()

int vtkPythonCalculator::RequestDataObject ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
)
overrideprotectedvirtual

Reimplemented from vtkPassInputTypeAlgorithm.

Member Data Documentation

◆ Expression

std::string vtkPythonCalculator::Expression
protected

Definition at line 119 of file vtkPythonCalculator.h.

◆ MultilineExpression

std::string vtkPythonCalculator::MultilineExpression
protected

Definition at line 120 of file vtkPythonCalculator.h.

◆ UseMultilineExpression

bool vtkPythonCalculator::UseMultilineExpression = false
protected

Definition at line 121 of file vtkPythonCalculator.h.

◆ ArrayName

char* vtkPythonCalculator::ArrayName = nullptr
protected

Definition at line 123 of file vtkPythonCalculator.h.

◆ ArrayAssociation

int vtkPythonCalculator::ArrayAssociation = vtkDataObject::FIELD_ASSOCIATION_POINTS
protected

Definition at line 124 of file vtkPythonCalculator.h.

◆ ResultArrayType

int vtkPythonCalculator::ResultArrayType = VTK_DOUBLE
protected

Definition at line 125 of file vtkPythonCalculator.h.


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