Man Page for vtkConnectivityFilter
Table of Contents

NAME

vtkConnectivityFilter - extract data based on geometric connectivity

SYNOPSIS


#include "/opt/vtk-c++/graphics/vtkConnectivityFilter.h"

class VTK_EXPORT vtkConnectivityFilter : public vtkDataSetToUnstructuredGridFilter

vtkConnectivityFilter();
~vtkConnectivityFilter();
static vtkConnectivityFilter *New() {return new vtkConnectivityFilter;};
const char *GetClassName() {return "vtkConnectivityFilter";};
void PrintSelf(ostream& os, vtkIndent indent);
void SetScalarConnectivity(int);
int GetScalarConnectivity();
void ScalarConnectivityOn();
void ScalarConnectivityOff();
void SetScalarRange(float data[2]);
void SetScalarRange(float *);
float *GetScalarRange();
void GetScalarRange(float data[2]);
void SetExtractionMode(int);
VTK_EXTRACT_POINT_SEEDED_REGIONS,VTK_EXTRACT_LARGEST_REGION);
int GetExtractionMode();
void SetExtractionModeToPointSeededRegions()
{this->SetExtractionMode(VTK_EXTRACT_POINT_SEEDED_REGIONS);};
void SetExtractionModeToCellSeededRegions()
{this->SetExtractionMode(VTK_EXTRACT_CELL_SEEDED_REGIONS);};
void SetExtractionModeToLargestRegion()
{this->SetExtractionMode(VTK_EXTRACT_LARGEST_REGION);};
void SetExtractionModeToSpecifiedRegions()
{this->SetExtractionMode(VTK_EXTRACT_SPECIFIED_REGIONS);};
char *GetExtractionModeAsString();
void InitializeSeedList();
void AddSeed(int id);
void DeleteSeed(int id);
void InitializeSpecifiedRegionList();
void AddSpecifiedRegion(int id);
void DeleteSpecifiedRegion(int id);
int GetNumberOfExtractedRegions();
void SetMaxRecursionDepth(int);
int GetMaxRecursionDepth();
void SetColorRegions(int);
int GetColorRegions();
void ColorRegionsOn();
void ColorRegionsOff();

DESCRIPTION

vtkConnectivityFilter is a filter that extracts cells that share common points. The filter works in one of four ways: 1) extract the largest connected region in the dataset; 2) extract specified region numbers; 3) extract all regions sharing specified point ids; or 4) extract all regions sharing specified cell ids.

vtkConnectivityFilter is generalized to handle any type of input dataset. It generates output data of type vtkUnstructuredGrid. If you know that your input type is vtkPolyData,
you may wish to use vtkPolyDataConnectivityFilter.

The behavior of vtkConnectivityFilter 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 vertex) 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 volume datasets: it can be used as a simple "connected segmentation" algorithm. For example, by using a seed voxel
(i.e., cell) on a known anatomical structure, connectivity will pull out all voxels "containing" the anatomical structure. These voxels can then be contoured or processed by other visualization filters.

SEE ALSO

vtkPolyDataConnectivityFilter

DEFINED MACROS

VTK_EXTRACT_POINT_SEEDED_REGIONS 1
VTK_EXTRACT_CELL_SEEDED_REGIONS 2
VTK_EXTRACT_SPECIFIED_REGIONS 3
VTK_EXTRACT_LARGEST_REGION 4

SUMMARY

void 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.

void SetScalarRange(float data[2])
void SetScalarRange(float *)
Set the scalar range to use to extract cells based on scalar connectivity.

void SetExtractionMode(int)
Control the extraction of connected surfaces.

void SetMaxRecursionDepth(int)
The connectivity extraction algorithm works recursively. In some systems the stack depth is limited.
This methods specifies the maximum recursion depth.

void SetColorRegions(int)
Turn on/off the coloring of connected regions.

char *GetExtractionModeAsString(void)
Return the method of extraction as a string.

vtkConnectivityFilter()
Construct with default extraction mode to extract largest regions.

int GetNumberOfExtractedRegions()
Obtain the number of connected regions.

void InitializeSeedList()
Initialize list of point ids/cell ids used to seed regions.

void AddSeed(int id)
Add a seed id (point or cell id). Note: ids are 0offset.

void DeleteSeed(int id)
Delete a seed id (point or cell id). Note: ids are 0offset.

void InitializeSpecifiedRegionList()
Initialize list of region ids to extract.

void AddSpecifiedRegion(int id)
Add a region id to extract. Note: ids are 0-offset.

void DeleteSpecifiedRegion(int id)
Delete a region id to extract. Note: ids are 0-offset.


Table of Contents