Section: Visualization Toolkit Graphics Classes
To generate contour lines the input data must be of topological dimension 2 (i.e., an image). If not, you can use the ImageRange ivar to select an image plane from an input volume. This avoids having to extract a plane first (using vtkExtractSubVolume). The filter deals with this by first trying to use the input data directly, and if not a 2D image, then uses the ImageRange ivar to reduce it to an image.
To create an instance of class vtkMarchingSquares, simply invoke its constructor as follows
obj = vtkMarchingSquares
obj
is an instance of the vtkMarchingSquares class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkMarchingSquares = obj.NewInstance ()
vtkMarchingSquares = obj.SafeDownCast (vtkObject o)
obj.SetImageRange (int [6])
- Set/Get the i-j-k index range which define a plane on which to generate
contour lines. Using this ivar it is possible to input a 3D volume
directly and then generate contour lines on one of the i-j-k planes, or
a portion of a plane.
int = obj. GetImageRange ()
- Set/Get the i-j-k index range which define a plane on which to generate
contour lines. Using this ivar it is possible to input a 3D volume
directly and then generate contour lines on one of the i-j-k planes, or
a portion of a plane.
obj.SetImageRange (int imin, int imax, int jmin, int jmax, int kmin, int kmax)
- Set/Get the i-j-k index range which define a plane on which to generate
contour lines. Using this ivar it is possible to input a 3D volume
directly and then generate contour lines on one of the i-j-k planes, or
a portion of a plane.
obj.SetValue (int i, double value)
- Methods to set contour values
double = obj.GetValue (int i)
- Methods to set contour values
obj.GetValues (double contourValues)
- Methods to set contour values
obj.SetNumberOfContours (int number)
- Methods to set contour values
int = obj.GetNumberOfContours ()
- Methods to set contour values
obj.GenerateValues (int numContours, double range[2])
- Methods to set contour values
obj.GenerateValues (int numContours, double rangeStart, double rangeEnd)
- Methods to set contour values
long = obj.GetMTime ()
- Because we delegate to vtkContourValues
obj.SetLocator (vtkIncrementalPointLocator locator)
vtkIncrementalPointLocator = obj.GetLocator ()
obj.CreateDefaultLocator ()
- Create default locator. Used to create one when none is specified.
The locator is used to merge coincident points.