Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkProgrammableSource Class Reference

generate source dataset via a user-specified function. More...

#include <vtkProgrammableSource.h>

Inheritance diagram for vtkProgrammableSource:

Inheritance graph
[legend]
Collaboration diagram for vtkProgrammableSource:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void SetExecuteMethod (void(*f)(void *), void *arg)
void SetExecuteMethodArgDelete (void(*f)(void *))
vtkPolyDataGetPolyDataOutput ()
vtkStructuredPointsGetStructuredPointsOutput ()
vtkStructuredGridGetStructuredGridOutput ()
vtkUnstructuredGridGetUnstructuredGridOutput ()
vtkRectilinearGridGetRectilinearGridOutput ()
void UpdateInformation ()
void UpdateData (vtkDataObject *output)

Static Public Methods

vtkProgrammableSource * New ()
int IsTypeOf (const char *type)
vtkProgrammableSource * SafeDownCast (vtkObject *o)

Protected Methods

 vtkProgrammableSource ()
 ~vtkProgrammableSource ()
 vtkProgrammableSource (const vtkProgrammableSource &)
void operator= (const vtkProgrammableSource &)
void Execute ()

Protected Attributes

void(* ExecuteMethod )(void *)
void(* ExecuteMethodArgDelete )(void *)
void * ExecuteMethodArg
vtkTimeStamp ExecuteTime

Detailed Description

generate source dataset via a user-specified function.

Date:
2000/12/10 20:08:48
Revision:
1.15

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 an output dataset of any (concrete) 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 vtkProgrammableAttributeDataFilter vtkProgrammableDataObjectSource
Examples:
vtkProgrammableSource (examples)

Definition at line 78 of file vtkProgrammableSource.h.


Constructor & Destructor Documentation

vtkProgrammableSource::vtkProgrammableSource   [protected]
 

vtkProgrammableSource::~vtkProgrammableSource   [protected]
 

vtkProgrammableSource::vtkProgrammableSource const vtkProgrammableSource &    [inline, protected]
 

Definition at line 115 of file vtkProgrammableSource.h.


Member Function Documentation

vtkProgrammableSource* vtkProgrammableSource::New   [static]
 

Instantiate object with no start, end, or progress methods.

Reimplemented from vtkSource.

virtual const char* vtkProgrammableSource::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkSource.

int vtkProgrammableSource::IsTypeOf const char *    type [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 vtkSource.

virtual int vtkProgrammableSource::IsA const char *    type [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 vtkSource.

vtkProgrammableSource* vtkProgrammableSource::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkSource.

void vtkProgrammableSource::SetExecuteMethod void(*    f)(void *),
void *    arg
 

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

void vtkProgrammableSource::SetExecuteMethodArgDelete void(*    f)(void *)
 

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

vtkPolyData* vtkProgrammableSource::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* vtkProgrammableSource::GetStructuredPointsOutput  
 

Get the output as a concrete type.

vtkStructuredGrid* vtkProgrammableSource::GetStructuredGridOutput  
 

Get the output as a concrete type.

vtkUnstructuredGrid* vtkProgrammableSource::GetUnstructuredGridOutput  
 

Get the output as a concrete type.

vtkRectilinearGrid* vtkProgrammableSource::GetRectilinearGridOutput  
 

Get the output as a concrete type.

void vtkProgrammableSource::UpdateInformation   [virtual]
 

Updates any global information about the data (like spacing for images)

Reimplemented from vtkSource.

void vtkProgrammableSource::UpdateData vtkDataObject   output [virtual]
 

Reimplemented from vtkSource.

void vtkProgrammableSource::operator= const vtkProgrammableSource &    [inline, protected]
 

Definition at line 116 of file vtkProgrammableSource.h.

void vtkProgrammableSource::Execute   [protected, virtual]
 

Reimplemented from vtkSource.


Member Data Documentation

void(* vtkProgrammableSource::ExecuteMethod)(void *) [protected]
 

void(* vtkProgrammableSource::ExecuteMethodArgDelete)(void *) [protected]
 

void* vtkProgrammableSource::ExecuteMethodArg [protected]
 

Definition at line 122 of file vtkProgrammableSource.h.

vtkTimeStamp vtkProgrammableSource::ExecuteTime [protected]
 

Definition at line 124 of file vtkProgrammableSource.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 12:57:54 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001