FreeMat: vtkProgrammableFilter

FreeMat

- Main Page
- Related Pages

vtkProgrammableFilter

Section: Visualization Toolkit Graphics Classes

# Usage

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.

To create an instance of class vtkProgrammableFilter, simply invoke its constructor as follows

      obj = vtkProgrammableFilter

# Methods

The class vtkProgrammableFilter has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkProgrammableFilter class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkProgrammableFilter = obj.NewInstance ()`
- `vtkProgrammableFilter = obj.SafeDownCast (vtkObject o)`
- `vtkPolyData = obj.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 = obj.GetStructuredPointsInput ()` - Get the input as a concrete type.
- `vtkStructuredGrid = obj.GetStructuredGridInput ()` - Get the input as a concrete type.
- `vtkUnstructuredGrid = obj.GetUnstructuredGridInput ()` - Get the input as a concrete type.
- `vtkRectilinearGrid = obj.GetRectilinearGridInput ()` - Get the input as a concrete type.
- `vtkGraph = obj.GetGraphInput ()` - Get the input as a concrete type.
- `vtkTable = obj.GetTableInput ()` - Get the input as a concrete type.
- `obj.SetCopyArrays (bool )` - When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
- `bool = obj.GetCopyArrays ()` - When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
- `obj.CopyArraysOn ()` - When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
- `obj.CopyArraysOff ()` - When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.