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

Executes a user supplied python script on its input dataset to produce an output dataset. More...

#include <vtkPythonProgrammableFilter.h>

Inheritance diagram for vtkPythonProgrammableFilter:
Inheritance graph
[legend]
Collaboration diagram for vtkPythonProgrammableFilter:
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
 
void ClearParameters ()
 Clear all name-value parameters. More...
 
void SetNumberOfInputPorts (int numberOfInputPorts) override
 Set the number of input ports This function is explicitly exposed to enable a vtkClientServerInterpreter to call it. More...
 
bool GetNeedsUpdate ()
 Application code can call GetNeedsUpdate to check if the algorithm can use an update to show updated information. More...
 
virtual void SetNeedsUpdate (bool)
 CheckNeedsUpdateScript should call SetNeedsUpdate(true) to indicate that the algorithm has new data and hence may be updated. 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...
 
virtual void SetCheckNeedsUpdateScript (const char *)
 For "live" sources, this script, if provided, if used to determine if the source needs an update. More...
 
virtual char * GetCheckNeedsUpdateScript ()
 For "live" sources, this script, if provided, if used to determine if the source needs an update. 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...
 
- 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 *)
 
vtkDataObjectGetOutput ()
 
vtkDataObjectGetOutput (int)
 
void SetInputData (vtkDataObject *)
 
void SetInputData (int, vtkDataObject *)
 
void AddInputData (vtkDataObject *)
 
void AddInputData (int, vtkDataObject *)
 
- 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 vtkPythonProgrammableFilterSafeDownCast (vtkObject *o)
 
static vtkPythonProgrammableFilterNew ()
 
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

 vtkPythonProgrammableFilter ()
 
 ~vtkPythonProgrammableFilter () override
 
void Exec (const char *, const char *)
 For internal use only. More...
 
int FillOutputPortInformation (int port, vtkInformation *info) override
 
int FillInputPortInformation (int port, vtkInformation *info) override
 
int RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 Creates whatever output data set type is selected. More...
 
int RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 
int RequestUpdateExtent (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 
int ProcessRequest (vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
 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...
 
- Protected Member Functions inherited from vtkProgrammableFilter
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkProgrammableFilter ()
 
 ~vtkProgrammableFilter ()
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
- Protected Member Functions inherited from vtkPassInputTypeAlgorithm
 vtkPassInputTypeAlgorithm ()
 
 ~vtkPassInputTypeAlgorithm ()
 
virtual int RequestUpdateTime (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestUpdateTimeDependentInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
vtkDataObjectGetInput (int port)
 
- Protected Member Functions inherited from vtkAlgorithm
 vtkAlgorithm ()
 
 ~vtkAlgorithm ()
 
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

char * Script
 
char * InformationScript
 
char * UpdateExtentScript
 
char * CheckNeedsUpdateScript
 
char * PythonPath
 
int OutputDataSetType
 
bool NeedsUpdate
 
- 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

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 38 of file vtkPythonProgrammableFilter.h.

Member Typedef Documentation

◆ Superclass

Definition at line 42 of file vtkPythonProgrammableFilter.h.

Constructor & Destructor Documentation

◆ vtkPythonProgrammableFilter()

vtkPythonProgrammableFilter::vtkPythonProgrammableFilter ( )
protected

◆ ~vtkPythonProgrammableFilter()

vtkPythonProgrammableFilter::~vtkPythonProgrammableFilter ( )
overrideprotected

Member Function Documentation

◆ 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

Reimplemented from vtkProgrammableFilter.

◆ SafeDownCast()

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

◆ PrintSelf()

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

Reimplemented from vtkProgrammableFilter.

◆ New()

static vtkPythonProgrammableFilter* vtkPythonProgrammableFilter::New ( )
static

◆ 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

Set the text of the python script to execute in RequestInformation().

◆ GetInformationScript()

virtual char* vtkPythonProgrammableFilter::GetInformationScript ( )
virtual

Set the text of the python script to execute in RequestInformation().

◆ SetUpdateExtentScript()

virtual void vtkPythonProgrammableFilter::SetUpdateExtentScript ( const char *  )
virtual

Set the text of the python script to execute in RequestUpdateExtent().

◆ GetUpdateExtentScript()

virtual char* vtkPythonProgrammableFilter::GetUpdateExtentScript ( )
virtual

Set the text of the python script to execute in RequestUpdateExtent().

◆ SetCheckNeedsUpdateScript()

virtual void vtkPythonProgrammableFilter::SetCheckNeedsUpdateScript ( const char *  )
virtual

For "live" sources, this script, if provided, if used to determine if the source needs an update.

◆ GetCheckNeedsUpdateScript()

virtual char* vtkPythonProgrammableFilter::GetCheckNeedsUpdateScript ( )
virtual

For "live" sources, this script, if provided, if used to determine if the source needs an update.

◆ 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

For internal use only.

◆ 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)
inlineoverridevirtual

Set the number of input ports This function is explicitly exposed to enable a vtkClientServerInterpreter to call it.

Reimplemented from vtkAlgorithm.

Definition at line 132 of file vtkPythonProgrammableFilter.h.

◆ GetNeedsUpdate()

bool vtkPythonProgrammableFilter::GetNeedsUpdate ( )

Application code can call GetNeedsUpdate to check if the algorithm can use an update to show updated information.

◆ SetNeedsUpdate()

virtual void vtkPythonProgrammableFilter::SetNeedsUpdate ( bool  )
virtual

CheckNeedsUpdateScript should call SetNeedsUpdate(true) to indicate that the algorithm has new data and hence may be updated.

◆ Exec()

void vtkPythonProgrammableFilter::Exec ( const char *  ,
const char *   
)
protected

For internal use only.

◆ FillOutputPortInformation()

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

Reimplemented from vtkPassInputTypeAlgorithm.

◆ FillInputPortInformation()

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

Reimplemented from vtkProgrammableFilter.

◆ RequestDataObject()

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

Creates whatever output data set type is selected.

Reimplemented from vtkPassInputTypeAlgorithm.

◆ RequestInformation()

int vtkPythonProgrammableFilter::RequestInformation ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
)
overrideprotectedvirtual

Reimplemented from vtkPassInputTypeAlgorithm.

◆ RequestUpdateExtent()

int vtkPythonProgrammableFilter::RequestUpdateExtent ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
)
overrideprotectedvirtual

Reimplemented from vtkPassInputTypeAlgorithm.

◆ ProcessRequest()

int vtkPythonProgrammableFilter::ProcessRequest ( vtkInformation request,
vtkInformationVector **  inInfo,
vtkInformationVector outInfo 
)
overrideprotectedvirtual

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.

Reimplemented from vtkPassInputTypeAlgorithm.

Member Data Documentation

◆ Script

char* vtkPythonProgrammableFilter::Script
protected

Definition at line 183 of file vtkPythonProgrammableFilter.h.

◆ InformationScript

char* vtkPythonProgrammableFilter::InformationScript
protected

Definition at line 184 of file vtkPythonProgrammableFilter.h.

◆ UpdateExtentScript

char* vtkPythonProgrammableFilter::UpdateExtentScript
protected

Definition at line 185 of file vtkPythonProgrammableFilter.h.

◆ CheckNeedsUpdateScript

char* vtkPythonProgrammableFilter::CheckNeedsUpdateScript
protected

Definition at line 186 of file vtkPythonProgrammableFilter.h.

◆ PythonPath

char* vtkPythonProgrammableFilter::PythonPath
protected

Definition at line 187 of file vtkPythonProgrammableFilter.h.

◆ OutputDataSetType

int vtkPythonProgrammableFilter::OutputDataSetType
protected

Definition at line 188 of file vtkPythonProgrammableFilter.h.

◆ NeedsUpdate

bool vtkPythonProgrammableFilter::NeedsUpdate
protected

Definition at line 189 of file vtkPythonProgrammableFilter.h.


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