Section: Visualization Toolkit Graphics Classes
Example use of this include writing a function to read a data file or interface to another system. (You might want to do this in favor of deriving a new class.) Another important use of this class is that it allows users of interpreters (e.g., Tcl or Java) the ability to write source objects without having to recompile C++ code or generate new libraries.
To create an instance of class vtkProgrammableSource, simply invoke its constructor as follows
obj = vtkProgrammableSource
obj
is an instance of the vtkProgrammableSource class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkProgrammableSource = obj.NewInstance ()
vtkProgrammableSource = obj.SafeDownCast (vtkObject o)
vtkPolyData = obj.GetPolyDataOutput ()
- Get the output as a concrete type. This method is typically used by the
writer of the source function to get the output as a particular type
(i.e., it essentially does type casting). It is the users responsibility
to know the correct type of the output data.
vtkStructuredPoints = obj.GetStructuredPointsOutput ()
- Get the output as a concrete type.
vtkStructuredGrid = obj.GetStructuredGridOutput ()
- Get the output as a concrete type.
vtkUnstructuredGrid = obj.GetUnstructuredGridOutput ()
- Get the output as a concrete type.
vtkRectilinearGrid = obj.GetRectilinearGridOutput ()
- Get the output as a concrete type.