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

# vtkProgrammableFilter Class Reference

`#include <vtkProgrammableFilter.h>`

Inheritance diagram for vtkProgrammableFilter:

[legend]
Collaboration diagram for vtkProgrammableFilter:

[legend]
List of all members.

## Detailed Description

a user-programmable filter

Date:
  2002/01/22 15:29:40

Revision:
  1.20

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.

Warning:
  The filter correctly manages modified time and network execution in most cases. However, if you change the definition of the filter function, you'll want to send a manual Modified() method to the filter to force it to reexecute.

See also:
  vtkProgrammablePointDataFilter vtkProgrammableSource

Created by:
  - Schroeder, Will

CVS contributions (if > 5%):
  - Schroeder, Will (61%)
  - Martin, Ken (25%)
  - Kelly, Ann (11%)

CVS logs (CVSweb):
  - .`h` (`/Graphics/vtkProgrammableFilter.h)`
  - .`cxx` (`/Graphics/vtkProgrammableFilter.cxx)`

Examples:
  vtkProgrammableFilter (Examples)

Tests:
  vtkProgrammableFilter (Tests)

Definition at line 66 of file vtkProgrammableFilter.h.

## Public Types
typedef vtkDataSetToDataSetFilter | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | SetExecuteMethod (void(*f)(void *), void *arg)
void | SetExecuteMethodArgDelete (void(*f)(void *))
vtkPolyData * | GetPolyDataInput ()
vtkStructuredPoints * | GetStructuredPointsInput ()
vtkStructuredGrid * | GetStructuredGridInput ()
vtkUnstructuredGrid * | GetUnstructuredGridInput ()
vtkRectilinearGrid * | GetRectilinearGridInput ()
## Static Public Methods
vtkProgrammableFilter * | New ()
int | IsTypeOf (const char *type)
vtkProgrammableFilter * | SafeDownCast (vtkObject *o)
## Protected Methods
| vtkProgrammableFilter ()
| ~vtkProgrammableFilter ()
void | Execute ()
## Protected Attributes
void(* | ExecuteMethod )(void *)
void(* | ExecuteMethodArgDelete )(void *)
void * | ExecuteMethodArg

## Member Typedef Documentation

typedef vtkDataSetToDataSetFilter vtkProgrammableFilter::Superclass

| Reimplemented from vtkDataSetToDataSetFilter. Definition at line 70 of file vtkProgrammableFilter.h.

## Constructor & Destructor Documentation

vtkProgrammableFilter::vtkProgrammableFilter | ( |  | ) | `[protected]`

vtkProgrammableFilter::~vtkProgrammableFilter | ( |  | ) | `[protected]`

## Member Function Documentation

vtkProgrammableFilter* vtkProgrammableFilter::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject.

virtual const char* vtkProgrammableFilter::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkDataSetToDataSetFilter.

int vtkProgrammableFilter::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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkDataSetToDataSetFilter.

virtual int vtkProgrammableFilter::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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkDataSetToDataSetFilter.

vtkProgrammableFilter* vtkProgrammableFilter::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkDataSetToDataSetFilter.

void vtkProgrammableFilter::SetExecuteMethod | ( | void(* | f)(void *),
|  | 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(* | f)(void *) | ) |

| 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.

void vtkProgrammableFilter::Execute | ( |  | ) | `[protected, virtual]`

| This method is the old style execute method Reimplemented from vtkSource.

## Member Data Documentation

void(* vtkProgrammableFilter::ExecuteMethod)(void *)`[protected]`

void(* vtkProgrammableFilter::ExecuteMethodArgDelete)(void *)`[protected]`

void* vtkProgrammableFilter::ExecuteMethodArg`[protected]`

| Definition at line 105 of file vtkProgrammableFilter.h.

The documentation for this class was generated from the following file:

- Graphics/vtkProgrammableFilter.h