FreeMat

- Main Page
- Related Pages

vtkCastToConcrete

Section: Visualization Toolkit Filtering Classes

# Usage

vtkCastToConcrete is a filter that works around type-checking limitations in the filter classes. Some filters generate abstract types on output, and cannot be connected to the input of filters requiring a concrete input type. For example, vtkElevationFilter generates vtkDataSet for output, and cannot be connected to vtkDecimate, because vtkDecimate requires vtkPolyData as input. This is true even though (in this example) the input to vtkElevationFilter is of type vtkPolyData, and you know the output of vtkElevationFilter is the same type as its input.

vtkCastToConcrete performs run-time checking to insure that output type is of the right type. An error message will result if you try to cast an input type improperly. Otherwise, the filter performs the appropriate cast and returns the data.

To create an instance of class vtkCastToConcrete, simply invoke its constructor as follows

      obj = vtkCastToConcrete

# Methods

The class vtkCastToConcrete has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkCastToConcrete class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkCastToConcrete = obj.NewInstance ()`
- `vtkCastToConcrete = obj.SafeDownCast (vtkObject o)`