vtkConnectivityFilter Class Reference

#include <vtkConnectivityFilter.h>

Inheritance diagram for vtkConnectivityFilter:

Inheritance graph
[legend]
Collaboration diagram for vtkConnectivityFilter:

Collaboration graph
[legend]

List of all members.


Detailed Description

extract data based on geometric connectivity

vtkConnectivityFilter is a filter that extracts cells that share common points and/or meet other connectivity criterion. (Cells that share vertices and meet other connectivity criterion such as scalar range are known as 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 the data by region).

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 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 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
Examples:
vtkConnectivityFilter (Examples)
Tests:
vtkConnectivityFilter (Tests)

Definition at line 73 of file vtkConnectivityFilter.h.


Public Types

typedef
vtkUnstructuredGridAlgorithm 
Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void InitializeSeedList ()
void AddSeed (vtkIdType id)
void DeleteSeed (vtkIdType id)
void InitializeSpecifiedRegionList ()
void AddSpecifiedRegion (int id)
void DeleteSpecifiedRegion (int id)
int GetNumberOfExtractedRegions ()
virtual void SetScalarConnectivity (int)
virtual int GetScalarConnectivity ()
virtual void ScalarConnectivityOn ()
virtual void ScalarConnectivityOff ()
virtual void SetScalarRange (double, double)
void SetScalarRange (double[2])
virtual double * GetScalarRange ()
virtual void GetScalarRange (double &, double &)
virtual void GetScalarRange (double[2])
virtual void SetExtractionMode (int)
virtual int GetExtractionMode ()
void SetExtractionModeToPointSeededRegions ()
void SetExtractionModeToCellSeededRegions ()
void SetExtractionModeToLargestRegion ()
void SetExtractionModeToSpecifiedRegions ()
void SetExtractionModeToClosestPointRegion ()
void SetExtractionModeToAllRegions ()
const char * GetExtractionModeAsString ()
virtual void SetClosestPoint (double, double, double)
virtual void SetClosestPoint (double[3])
virtual double * GetClosestPoint ()
virtual void GetClosestPoint (double data[3])
virtual void SetColorRegions (int)
virtual int GetColorRegions ()
virtual void ColorRegionsOn ()
virtual void ColorRegionsOff ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkConnectivityFilterSafeDownCast (vtkObject *o)
static vtkConnectivityFilterNew ()

Protected Member Functions

 vtkConnectivityFilter ()
 ~vtkConnectivityFilter ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int FillInputPortInformation (int port, vtkInformation *info)
void TraverseAndMark (vtkDataSet *input)

Protected Attributes

int ColorRegions
int ExtractionMode
vtkIdListSeeds
vtkIdListSpecifiedRegionIds
vtkIdTypeArrayRegionSizes
double ClosestPoint [3]
int ScalarConnectivity
double ScalarRange [2]

Member Typedef Documentation

Reimplemented from vtkUnstructuredGridAlgorithm.

Definition at line 76 of file vtkConnectivityFilter.h.


Constructor & Destructor Documentation

vtkConnectivityFilter::vtkConnectivityFilter (  )  [protected]

vtkConnectivityFilter::~vtkConnectivityFilter (  )  [protected]


Member Function Documentation

virtual const char* vtkConnectivityFilter::GetClassName (  )  [virtual]

Reimplemented from vtkUnstructuredGridAlgorithm.

static int vtkConnectivityFilter::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkUnstructuredGridAlgorithm.

virtual int vtkConnectivityFilter::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkUnstructuredGridAlgorithm.

static vtkConnectivityFilter* vtkConnectivityFilter::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkUnstructuredGridAlgorithm.

void vtkConnectivityFilter::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkUnstructuredGridAlgorithm.

static vtkConnectivityFilter* vtkConnectivityFilter::New (  )  [static]

Construct with default extraction mode to extract largest regions.

Reimplemented from vtkUnstructuredGridAlgorithm.

virtual void vtkConnectivityFilter::SetScalarConnectivity ( int   )  [virtual]

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.

virtual int vtkConnectivityFilter::GetScalarConnectivity (  )  [virtual]

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.

virtual void vtkConnectivityFilter::ScalarConnectivityOn (  )  [virtual]

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.

virtual void vtkConnectivityFilter::ScalarConnectivityOff (  )  [virtual]

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.

virtual void vtkConnectivityFilter::SetScalarRange ( double  ,
double   
) [virtual]

Set the scalar range to use to extract cells based on scalar connectivity.

void vtkConnectivityFilter::SetScalarRange ( double  [2]  ) 

Set the scalar range to use to extract cells based on scalar connectivity.

virtual double* vtkConnectivityFilter::GetScalarRange (  )  [virtual]

Set the scalar range to use to extract cells based on scalar connectivity.

virtual void vtkConnectivityFilter::GetScalarRange ( double &  ,
double &   
) [virtual]

Set the scalar range to use to extract cells based on scalar connectivity.

virtual void vtkConnectivityFilter::GetScalarRange ( double  [2]  )  [virtual]

Set the scalar range to use to extract cells based on scalar connectivity.

virtual void vtkConnectivityFilter::SetExtractionMode ( int   )  [virtual]

Control the extraction of connected surfaces.

virtual int vtkConnectivityFilter::GetExtractionMode (  )  [virtual]

Control the extraction of connected surfaces.

void vtkConnectivityFilter::SetExtractionModeToPointSeededRegions (  )  [inline]

Control the extraction of connected surfaces.

Definition at line 103 of file vtkConnectivityFilter.h.

void vtkConnectivityFilter::SetExtractionModeToCellSeededRegions (  )  [inline]

Control the extraction of connected surfaces.

Definition at line 105 of file vtkConnectivityFilter.h.

void vtkConnectivityFilter::SetExtractionModeToLargestRegion (  )  [inline]

Control the extraction of connected surfaces.

Definition at line 107 of file vtkConnectivityFilter.h.

void vtkConnectivityFilter::SetExtractionModeToSpecifiedRegions (  )  [inline]

Control the extraction of connected surfaces.

Definition at line 109 of file vtkConnectivityFilter.h.

void vtkConnectivityFilter::SetExtractionModeToClosestPointRegion (  )  [inline]

Control the extraction of connected surfaces.

Definition at line 111 of file vtkConnectivityFilter.h.

void vtkConnectivityFilter::SetExtractionModeToAllRegions (  )  [inline]

Control the extraction of connected surfaces.

Definition at line 113 of file vtkConnectivityFilter.h.

const char * vtkConnectivityFilter::GetExtractionModeAsString ( void   )  [inline]

Return the method of extraction as a string.

Definition at line 197 of file vtkConnectivityFilter.h.

void vtkConnectivityFilter::InitializeSeedList (  ) 

Initialize list of point ids/cell ids used to seed regions.

void vtkConnectivityFilter::AddSeed ( vtkIdType  id  ) 

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

void vtkConnectivityFilter::DeleteSeed ( vtkIdType  id  ) 

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

void vtkConnectivityFilter::InitializeSpecifiedRegionList (  ) 

Initialize list of region ids to extract.

void vtkConnectivityFilter::AddSpecifiedRegion ( int  id  ) 

Add a region id to extract. Note: ids are 0-offset.

void vtkConnectivityFilter::DeleteSpecifiedRegion ( int  id  ) 

Delete a region id to extract. Note: ids are 0-offset.

virtual void vtkConnectivityFilter::SetClosestPoint ( double  ,
double  ,
double   
) [virtual]

Use to specify x-y-z point coordinates when extracting the region closest to a specified point.

virtual void vtkConnectivityFilter::SetClosestPoint ( double  [3]  )  [virtual]

Use to specify x-y-z point coordinates when extracting the region closest to a specified point.

virtual double* vtkConnectivityFilter::GetClosestPoint (  )  [virtual]

Use to specify x-y-z point coordinates when extracting the region closest to a specified point.

virtual void vtkConnectivityFilter::GetClosestPoint ( double  data[3]  )  [virtual]

Use to specify x-y-z point coordinates when extracting the region closest to a specified point.

int vtkConnectivityFilter::GetNumberOfExtractedRegions (  ) 

Obtain the number of connected regions.

virtual void vtkConnectivityFilter::SetColorRegions ( int   )  [virtual]

Turn on/off the coloring of connected regions.

virtual int vtkConnectivityFilter::GetColorRegions (  )  [virtual]

Turn on/off the coloring of connected regions.

virtual void vtkConnectivityFilter::ColorRegionsOn (  )  [virtual]

Turn on/off the coloring of connected regions.

virtual void vtkConnectivityFilter::ColorRegionsOff (  )  [virtual]

Turn on/off the coloring of connected regions.

virtual int vtkConnectivityFilter::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkUnstructuredGridAlgorithm.

virtual int vtkConnectivityFilter::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkUnstructuredGridAlgorithm.

void vtkConnectivityFilter::TraverseAndMark ( vtkDataSet input  )  [protected]


Member Data Documentation

Definition at line 161 of file vtkConnectivityFilter.h.

Definition at line 162 of file vtkConnectivityFilter.h.

Definition at line 163 of file vtkConnectivityFilter.h.

Definition at line 164 of file vtkConnectivityFilter.h.

Definition at line 165 of file vtkConnectivityFilter.h.

double vtkConnectivityFilter::ClosestPoint[3] [protected]

Definition at line 167 of file vtkConnectivityFilter.h.

Definition at line 169 of file vtkConnectivityFilter.h.

double vtkConnectivityFilter::ScalarRange[2] [protected]

Definition at line 170 of file vtkConnectivityFilter.h.


The documentation for this class was generated from the following file:

Generated on Wed Aug 24 11:32:02 2011 for VTK by  doxygen 1.5.6