FreeMat
vtkMarchingSquares

Section: Visualization Toolkit Graphics Classes

Usage

vtkMarchingSquares is a filter that takes as input a structured points set and generates on output one or more isolines. One or more contour values must be specified to generate the isolines. Alternatively, you can specify a min/max scalar range and the number of contours to generate a series of evenly spaced contour values.

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

Methods

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