FreeMat

- Main Page
- Related Pages

vtkImageAnisotropicDiffusion3D

Section: Visualization Toolkit Imaging Classes

# Usage

vtkImageAnisotropicDiffusion3D diffuses an volume iteratively. The neighborhood of the diffusion is determined by the instance flags. if "Faces" is on, the 6 voxels adjoined by faces are included in the neighborhood. If "Edges" is on the 12 edge connected voxels are included, and if "Corners" is on, the 8 corner connected voxels are included. "DiffusionFactor" determines how far a pixel value moves toward its neighbors, and is insensitive to the number of neighbors chosen. The diffusion is anisotropic because it only occurs when a gradient measure is below "GradientThreshold". Two gradient measures exist and are toggled by the "GradientMagnitudeThreshold" flag. When "GradientMagnitudeThreshold" is on, the magnitude of the gradient, computed by central differences, above "DiffusionThreshold" a voxel is not modified. The alternative measure examines each neighbor independently. The gradient between the voxel and the neighbor must be below the "DiffusionThreshold" for diffusion to occur with THAT neighbor.

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

      obj = vtkImageAnisotropicDiffusion3D

# Methods

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

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkImageAnisotropicDiffusion3D = obj.NewInstance ()`
- `vtkImageAnisotropicDiffusion3D = obj.SafeDownCast (vtkObject o)`
- `obj.SetNumberOfIterations (int num)` - This method sets the number of interations which also affects the input neighborhood needed to compute one output pixel. Each iterations requires an extra pixel layer on the neighborhood. This is only relavent when you are trying to stream or are requesting a sub extent of the "wholeExtent".
- `int = obj.GetNumberOfIterations ()` - Get the number of iterations.
- `obj.SetDiffusionThreshold (double )` - Set/Get the difference threshold that stops diffusion. when the difference between two pixel is greater than this threshold, the pixels are not diffused. This causes diffusion to avoid sharp edges. If the GradientMagnitudeThreshold is set, then gradient magnitude is used for comparison instead of pixel differences.
- `double = obj.GetDiffusionThreshold ()` - Set/Get the difference threshold that stops diffusion. when the difference between two pixel is greater than this threshold, the pixels are not diffused. This causes diffusion to avoid sharp edges. If the GradientMagnitudeThreshold is set, then gradient magnitude is used for comparison instead of pixel differences.
- `obj.SetDiffusionFactor (double )` - Set/Get the difference factor
- `double = obj.GetDiffusionFactor ()` - Set/Get the difference factor
- `obj.SetFaces (int )` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `int = obj.GetFaces ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.FacesOn ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.FacesOff ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.SetEdges (int )` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `int = obj.GetEdges ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.EdgesOn ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.EdgesOff ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.SetCorners (int )` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `int = obj.GetCorners ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.CornersOn ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.CornersOff ()` - Choose neighbors to diffuse (6 faces, 12 edges, 8 corners).
- `obj.SetGradientMagnitudeThreshold (int )` - Switch between gradient magnitude threshold and pixel gradient threshold.
- `int = obj.GetGradientMagnitudeThreshold ()` - Switch between gradient magnitude threshold and pixel gradient threshold.
- `obj.GradientMagnitudeThresholdOn ()` - Switch between gradient magnitude threshold and pixel gradient threshold.
- `obj.GradientMagnitudeThresholdOff ()` - Switch between gradient magnitude threshold and pixel gradient threshold.