FreeMat
vtkPolyDataConnectivityFilter

Section: Visualization Toolkit Graphics Classes

Usage

vtkPolyDataConnectivityFilter is a filter that extracts cells that share common points and/or satisfy a scalar threshold criterion. (Such a group of cells is called a region.) The filter works in one of six ways: 1) extract the largest connected region in the dataset; 2) extract specified region numbers; 3) extract all regions sharing specified point ids; 4) extract all regions sharing specified cell ids; 5) extract the region closest to the specified point; or 6) extract all regions (used to color regions).

This filter is specialized for polygonal data. This means it runs a bit faster and is easier to construct visualization networks that process polygonal data.

The behavior of vtkPolyDataConnectivityFilter can be modified by turning on the boolean ivar ScalarConnectivity. If this flag is on, the connectivity algorithm is modified so that cells are considered connected only if 1) they are geometrically connected (share a point) and 2) the scalar values of one of the cell's points falls in the scalar range specified. This use of ScalarConnectivity is particularly useful for selecting cells for later processing.

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

  obj = vtkPolyDataConnectivityFilter

Methods

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

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkPolyDataConnectivityFilter = obj.NewInstance ()
  • vtkPolyDataConnectivityFilter = obj.SafeDownCast (vtkObject o)
  • obj.SetScalarConnectivity (int ) - Turn on/off connectivity based on scalar value. If on, cells are connected only if they share points AND one of the cells scalar values falls in the scalar range specified.
  • int = obj.GetScalarConnectivity () - Turn on/off connectivity based on scalar value. If on, cells are connected only if they share points AND one of the cells scalar values falls in the scalar range specified.
  • obj.ScalarConnectivityOn () - Turn on/off connectivity based on scalar value. If on, cells are connected only if they share points AND one of the cells scalar values falls in the scalar range specified.
  • obj.ScalarConnectivityOff () - Turn on/off connectivity based on scalar value. If on, cells are connected only if they share points AND one of the cells scalar values falls in the scalar range specified.
  • obj.SetScalarRange (double , double ) - Set the scalar range to use to extract cells based on scalar connectivity.
  • obj.SetScalarRange (double a[2]) - Set the scalar range to use to extract cells based on scalar connectivity.
  • double = obj. GetScalarRange () - Set the scalar range to use to extract cells based on scalar connectivity.
  • obj.SetExtractionMode (int ) - Control the extraction of connected surfaces.
  • int = obj.GetExtractionModeMinValue () - Control the extraction of connected surfaces.
  • int = obj.GetExtractionModeMaxValue () - Control the extraction of connected surfaces.
  • int = obj.GetExtractionMode () - Control the extraction of connected surfaces.
  • obj.SetExtractionModeToPointSeededRegions () - Control the extraction of connected surfaces.
  • obj.SetExtractionModeToCellSeededRegions () - Control the extraction of connected surfaces.
  • obj.SetExtractionModeToLargestRegion () - Control the extraction of connected surfaces.
  • obj.SetExtractionModeToSpecifiedRegions () - Control the extraction of connected surfaces.
  • obj.SetExtractionModeToClosestPointRegion () - Control the extraction of connected surfaces.
  • obj.SetExtractionModeToAllRegions () - Control the extraction of connected surfaces.
  • string = obj.GetExtractionModeAsString () - Control the extraction of connected surfaces.
  • obj.InitializeSeedList () - Initialize list of point ids/cell ids used to seed regions.
  • obj.AddSeed (int id) - Add a seed id (point or cell id). Note: ids are 0-offset.
  • obj.DeleteSeed (int id) - Delete a seed id (point or cell id). Note: ids are 0-offset.
  • obj.InitializeSpecifiedRegionList () - Initialize list of region ids to extract.
  • obj.AddSpecifiedRegion (int id) - Add a region id to extract. Note: ids are 0-offset.
  • obj.DeleteSpecifiedRegion (int id) - Delete a region id to extract. Note: ids are 0-offset.
  • obj.SetClosestPoint (double , double , double ) - Use to specify x-y-z point coordinates when extracting the region closest to a specified point.
  • obj.SetClosestPoint (double a[3]) - Use to specify x-y-z point coordinates when extracting the region closest to a specified point.
  • double = obj. GetClosestPoint () - Use to specify x-y-z point coordinates when extracting the region closest to a specified point.
  • int = obj.GetNumberOfExtractedRegions () - Obtain the number of connected regions.
  • obj.SetColorRegions (int ) - Turn on/off the coloring of connected regions.
  • int = obj.GetColorRegions () - Turn on/off the coloring of connected regions.
  • obj.ColorRegionsOn () - Turn on/off the coloring of connected regions.
  • obj.ColorRegionsOff () - Turn on/off the coloring of connected regions.