#include <vtkProgrammableFilter.h>
vtkProgrammableFilter is a filter that can be programmed by the user. To use the filter you define a function that retrieves input of the correct type, creates data, and then manipulates the output of the filter. Using this filter avoids the need for subclassing - and the function can be defined in an interpreter wrapper language such as Tcl or Java.
The trickiest part of using this filter is that the input and output methods are unusual and cannot be compile-time type checked. Instead, as a user of this filter it is your responsibility to set and get the correct input and output types.
Definition at line 53 of file vtkProgrammableFilter.h.
Reimplemented from vtkPassInputTypeAlgorithm.
Definition at line 57 of file vtkProgrammableFilter.h.
typedef void(* vtkProgrammableFilter::ProgrammableMethodCallbackType)(void *arg) |
Signature definition for programmable method callbacks. Methods passed to SetExecuteMethod or SetExecuteMethodArgDelete must conform to this signature. The presence of this typedef is useful for reference and for external analysis tools, but it cannot be used in the method signatures in these header files themselves because it prevents the internal VTK wrapper generators from wrapping these methods.
vtkProgrammableFilter::vtkProgrammableFilter | ( | ) | [protected] |
vtkProgrammableFilter::~vtkProgrammableFilter | ( | ) | [protected] |
static vtkProgrammableFilter* vtkProgrammableFilter::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkPassInputTypeAlgorithm.
virtual const char* vtkProgrammableFilter::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkPassInputTypeAlgorithm.
static int vtkProgrammableFilter::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkPassInputTypeAlgorithm.
virtual int vtkProgrammableFilter::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkPassInputTypeAlgorithm.
static vtkProgrammableFilter* vtkProgrammableFilter::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkPassInputTypeAlgorithm.
void vtkProgrammableFilter::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkPassInputTypeAlgorithm.
void vtkProgrammableFilter::SetExecuteMethod | ( | void(*)(void *) | f, | |
void * | arg | |||
) |
Specify the function to use to operate on the point attribute data. Note that the function takes a single (void *) argument.
void vtkProgrammableFilter::SetExecuteMethodArgDelete | ( | void(*)(void *) | f | ) |
Set the arg delete method. This is used to free user memory.
vtkPolyData* vtkProgrammableFilter::GetPolyDataInput | ( | ) |
Get the input as a concrete type. This method is typically used by the writer of the filter function to get the input as a particular type (i.e., it essentially does type casting). It is the users responsibility to know the correct type of the input data.
vtkStructuredPoints* vtkProgrammableFilter::GetStructuredPointsInput | ( | ) |
Get the input as a concrete type.
vtkStructuredGrid* vtkProgrammableFilter::GetStructuredGridInput | ( | ) |
Get the input as a concrete type.
vtkUnstructuredGrid* vtkProgrammableFilter::GetUnstructuredGridInput | ( | ) |
Get the input as a concrete type.
vtkRectilinearGrid* vtkProgrammableFilter::GetRectilinearGridInput | ( | ) |
Get the input as a concrete type.
vtkGraph* vtkProgrammableFilter::GetGraphInput | ( | ) |
Get the input as a concrete type.
vtkTable* vtkProgrammableFilter::GetTableInput | ( | ) |
Get the input as a concrete type.
virtual void vtkProgrammableFilter::SetCopyArrays | ( | bool | ) | [virtual] |
When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
virtual bool vtkProgrammableFilter::GetCopyArrays | ( | ) | [virtual] |
When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
virtual void vtkProgrammableFilter::CopyArraysOn | ( | ) | [virtual] |
When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
virtual void vtkProgrammableFilter::CopyArraysOff | ( | ) | [virtual] |
When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
int vtkProgrammableFilter::RequestData | ( | vtkInformation * | , | |
vtkInformationVector ** | , | |||
vtkInformationVector * | ||||
) | [protected, virtual] |
This is called within ProcessRequest when a request asks the algorithm to do its work. This is the method you should override to do whatever the algorithm is designed to do. This happens during the fourth pass in the pipeline execution process.
Reimplemented from vtkPassInputTypeAlgorithm.
virtual int vtkProgrammableFilter::FillInputPortInformation | ( | int | port, | |
vtkInformation * | info | |||
) | [protected, virtual] |
Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.
Reimplemented from vtkPassInputTypeAlgorithm.
Definition at line 116 of file vtkProgrammableFilter.h.
Definition at line 117 of file vtkProgrammableFilter.h.
void* vtkProgrammableFilter::ExecuteMethodArg [protected] |
Definition at line 118 of file vtkProgrammableFilter.h.
bool vtkProgrammableFilter::CopyArrays [protected] |
Definition at line 120 of file vtkProgrammableFilter.h.