Documentation for vtkProgrammableSource

vtkProgrammableSource - generate source data via a user-specified function

Super Class: vtkSource

Description:

vtkProgrammableSource is a source object that is programmable by the user. To use this object, you must specify a function that creates the output. It is possible to generate output of any type; it is up to the function to properly initialize and define the output. Typically, you use one of the methods to get a concrete output type (e.g., GetPolyDataOutput() or GetStructuredPointsOutput()), and then manipulate the output in the user-specified function. 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.

 

See Also:

vtkProgrammableFilter vtkProgrammablePointDataFilter

 

Methods:

void vtkProgrammableSource ()
void vtkProgrammableSource ()
static vtkProgrammableSource *New ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
void SetExecuteMethod (const )
void SetExecuteMethodArgDelete (const )
vtkPolyData *GetPolyDataOutput ()
vtkStructuredPoints *GetStructuredPointsOutput ()
vtkStructuredGrid *GetStructuredGridOutput ()
vtkUnstructuredGrid *GetUnstructuredGridOutput ()
vtkRectilinearGrid *GetRectilinearGridOutput ()
void Execute ()

 

Detailed Method Descriptions:

Specify the function to use to generate the source data. Note that the function takes a single (void *) argument.

void SetExecuteMethod (const )

Set the arg delete method. This is used to free user memory.

void SetExecuteMethodArgDelete (const )

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.

vtkPolyData *GetPolyDataOutput ()

Get the output as a concrete type.

vtkStructuredPoints *GetStructuredPointsOutput ()
vtkStructuredGrid *GetStructuredGridOutput ()
vtkUnstructuredGrid *GetUnstructuredGridOutput ()
vtkRectilinearGrid *GetRectilinearGridOutput ()