FreeMat: vtkImageSkeleton2D

FreeMat

- Main Page
- Related Pages

vtkImageSkeleton2D

Section: Visualization Toolkit Imaging Classes

# Usage

vtkImageSkeleton2D should leave only single pixel width lines of non-zero-valued pixels (values of 1 are not allowed). It works by erosion on a 3x3 neighborhood with special rules. The number of iterations determines how far the filter can erode. There are three pruning levels: prune == 0 will leave traces on all angles... prune == 1 will not leave traces on 135 degree angles, but will on 90. prune == 2 does not leave traces on any angles leaving only closed loops. Prune defaults to zero. The output scalar type is the same as the input.

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

      obj = vtkImageSkeleton2D

# Methods

The class vtkImageSkeleton2D 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 vtkImageSkeleton2D class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkImageSkeleton2D = obj.NewInstance ()`
- `vtkImageSkeleton2D = obj.SafeDownCast (vtkObject o)`
- `obj.SetPrune (int )` - When prune is on, only closed loops are left unchanged.
- `int = obj.GetPrune ()` - When prune is on, only closed loops are left unchanged.
- `obj.PruneOn ()` - When prune is on, only closed loops are left unchanged.
- `obj.PruneOff ()` - When prune is on, only closed loops are left unchanged.
- `obj.SetNumberOfIterations (int num)` - Sets the number of cycles in the erosion.