VTK
|
a user-programmable filter More...
#include <vtkProgrammableFilter.h>
Inherits vtkPassInputTypeAlgorithm.
Public Types | |
typedef vtkPassInputTypeAlgorithm | Superclass |
typedef void(* | ProgrammableMethodCallbackType )(void *arg) |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkProgrammableFilter * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetExecuteMethod (void(*f)(void *), void *arg) |
void | SetExecuteMethodArgDelete (void(*f)(void *)) |
vtkPolyData * | GetPolyDataInput () |
vtkStructuredPoints * | GetStructuredPointsInput () |
vtkStructuredGrid * | GetStructuredGridInput () |
vtkUnstructuredGrid * | GetUnstructuredGridInput () |
vtkRectilinearGrid * | GetRectilinearGridInput () |
vtkGraph * | GetGraphInput () |
vtkTable * | GetTableInput () |
virtual void | SetCopyArrays (bool) |
virtual bool | GetCopyArrays () |
virtual void | CopyArraysOn () |
virtual void | CopyArraysOff () |
Static Public Member Functions | |
static vtkProgrammableFilter * | New () |
static int | IsTypeOf (const char *type) |
static vtkProgrammableFilter * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkProgrammableFilter () | |
~vtkProgrammableFilter () | |
int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
virtual int | FillInputPortInformation (int port, vtkInformation *info) |
Protected Attributes | |
ProgrammableMethodCallbackType | ExecuteMethod |
ProgrammableMethodCallbackType | ExecuteMethodArgDelete |
void * | ExecuteMethodArg |
bool | CopyArrays |
a user-programmable filter
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 54 of file vtkProgrammableFilter.h.
typedef vtkPassInputTypeAlgorithm vtkProgrammableFilter::Superclass |
Definition at line 58 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.
Definition at line 68 of file vtkProgrammableFilter.h.
|
protected |
|
protected |
|
static |
|
static |
|
virtual |
|
static |
|
protectedvirtual |
vtkProgrammableFilter* vtkProgrammableFilter::NewInstance | ( | ) | const |
void vtkProgrammableFilter::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
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 |
When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
|
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 |
When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
|
virtual |
When CopyArrays is true, all arrays are copied to the output iff input and output are of the same type. False by default.
|
protected |
|
protectedvirtual |
|
protected |
Definition at line 117 of file vtkProgrammableFilter.h.
|
protected |
Definition at line 118 of file vtkProgrammableFilter.h.
|
protected |
Definition at line 119 of file vtkProgrammableFilter.h.
|
protected |
Definition at line 121 of file vtkProgrammableFilter.h.