Section: Visualization Toolkit Graphics Classes
This filter will identify special dataset types (e.g., structured points) and use the appropriate specialized filter to process the data. For examples, if the input dataset type is a volume, this filter will create an internal vtkMarchingCubes instance and use it. This gives much better performance. To use this filter you must specify one or more contour values. You can either use the method SetValue() to specify each contour value, or use GenerateValues() to generate a series of evenly spaced contours. It is also possible to accelerate the operation of this filter (at the cost of extra memory) by using a vtkScalarTree. A scalar tree is used to quickly locate cells that contain a contour surface. This is especially effective if multiple contours are being extracted. If you want to use a scalar tree, invoke the method UseScalarTreeOn().
To create an instance of class vtkMarchingContourFilter, simply invoke its constructor as follows
obj = vtkMarchingContourFilter
obj
is an instance of the vtkMarchingContourFilter class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkMarchingContourFilter = obj.NewInstance ()
vtkMarchingContourFilter = obj.SafeDownCast (vtkObject o)
obj.SetValue (int i, double value)
- Methods to set / get contour values.
double = obj.GetValue (int i)
- Methods to set / get contour values.
obj.GetValues (double contourValues)
- Methods to set / get contour values.
obj.SetNumberOfContours (int number)
- Methods to set / get contour values.
int = obj.GetNumberOfContours ()
- Methods to set / get contour values.
obj.GenerateValues (int numContours, double range[2])
- Methods to set / get contour values.
obj.GenerateValues (int numContours, double rangeStart, double rangeEnd)
- Methods to set / get contour values.
long = obj.GetMTime ()
- Modified GetMTime Because we delegate to vtkContourValues
obj.SetComputeNormals (int )
- Set/Get the computation of normals. Normal computation is fairly
expensive in both time and storage. If the output data will be
processed by filters that modify topology or geometry, it may be
wise to turn Normals and Gradients off.
int = obj.GetComputeNormals ()
- Set/Get the computation of normals. Normal computation is fairly
expensive in both time and storage. If the output data will be
processed by filters that modify topology or geometry, it may be
wise to turn Normals and Gradients off.
obj.ComputeNormalsOn ()
- Set/Get the computation of normals. Normal computation is fairly
expensive in both time and storage. If the output data will be
processed by filters that modify topology or geometry, it may be
wise to turn Normals and Gradients off.
obj.ComputeNormalsOff ()
- Set/Get the computation of normals. Normal computation is fairly
expensive in both time and storage. If the output data will be
processed by filters that modify topology or geometry, it may be
wise to turn Normals and Gradients off.
obj.SetComputeGradients (int )
- Set/Get the computation of gradients. Gradient computation is
fairly expensive in both time and storage. Note that if
ComputeNormals is on, gradients will have to be calculated, but
will not be stored in the output dataset. If the output data
will be processed by filters that modify topology or geometry, it
may be wise to turn Normals and Gradients off.
int = obj.GetComputeGradients ()
- Set/Get the computation of gradients. Gradient computation is
fairly expensive in both time and storage. Note that if
ComputeNormals is on, gradients will have to be calculated, but
will not be stored in the output dataset. If the output data
will be processed by filters that modify topology or geometry, it
may be wise to turn Normals and Gradients off.
obj.ComputeGradientsOn ()
- Set/Get the computation of gradients. Gradient computation is
fairly expensive in both time and storage. Note that if
ComputeNormals is on, gradients will have to be calculated, but
will not be stored in the output dataset. If the output data
will be processed by filters that modify topology or geometry, it
may be wise to turn Normals and Gradients off.
obj.ComputeGradientsOff ()
- Set/Get the computation of gradients. Gradient computation is
fairly expensive in both time and storage. Note that if
ComputeNormals is on, gradients will have to be calculated, but
will not be stored in the output dataset. If the output data
will be processed by filters that modify topology or geometry, it
may be wise to turn Normals and Gradients off.
obj.SetComputeScalars (int )
- Set/Get the computation of scalars.
int = obj.GetComputeScalars ()
- Set/Get the computation of scalars.
obj.ComputeScalarsOn ()
- Set/Get the computation of scalars.
obj.ComputeScalarsOff ()
- Set/Get the computation of scalars.
obj.SetUseScalarTree (int )
- Enable the use of a scalar tree to accelerate contour extraction.
int = obj.GetUseScalarTree ()
- Enable the use of a scalar tree to accelerate contour extraction.
obj.UseScalarTreeOn ()
- Enable the use of a scalar tree to accelerate contour extraction.
obj.UseScalarTreeOff ()
- Enable the use of a scalar tree to accelerate contour extraction.
obj.SetLocator (vtkIncrementalPointLocator locator)
- Set / get a spatial locator for merging points. By default,
an instance of vtkMergePoints is used.
vtkIncrementalPointLocator = obj.GetLocator ()
- Set / get a spatial locator for merging points. By default,
an instance of vtkMergePoints is used.
obj.CreateDefaultLocator ()
- Create default locator. Used to create one when none is
specified. The locator is used to merge coincident points.