Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkCleanPolyData Class Reference

#include <vtkCleanPolyData.h>

Inheritance diagram for vtkCleanPolyData:

Inheritance graph
[legend]
Collaboration diagram for vtkCleanPolyData:

Collaboration graph
[legend]
List of all members.

Detailed Description

merge duplicate points, and/or remove unused points and/or remove degenerate cells

vtkCleanPolyData is a filter that takes polygonal data as input and generates polygonal data as output. vtkCleanPolyData can merge duplicate points (within specified tolerance and if enabled), eliminate points that are not used, and if enabled, transform degenerate cells into appropriate forms (for example, a triangle is converted into a line if two points of triangle are merged).

Conversion of degenerate cells is controlled by the flags ConvertLinesToPoints, ConvertPolysToLines, ConvertStripsToPolys which act cumulatively such that a degenerate strip may become a poly. The full set is Line with 1 points -> Vert (if ConvertLinesToPoints) Poly with 2 points -> Line (if ConvertPolysToLines) Poly with 1 points -> Vert (if ConvertPolysToLines && ConvertLinesToPoints) Strp with 3 points -> Poly (if ConvertStripsToPolys) Strp with 2 points -> Line (if ConvertStripsToPolys && ConvertPolysToLines) Strp with 1 points -> Vert (if ConvertStripsToPolys && ConvertPolysToLines && ConvertLinesToPoints)

If tolerance is specified precisely=0.0, then vtkCleanPolyData will use the vtkMergePoints object to merge points (which is faster). Otherwise the slower vtkPointLocator is used. Before inserting points into the point locator, this class calls a function OperateOnPoint which can be used (in subclasses) to further refine the cleaning process. See vtkQuantizePolyDataPoints.

Note that merging of points can be disabled. In this case, a point locator will not be used, and points that are not used by any cells will be eliminated, but never merged.

Warning:
Merging points can alter topology, including introducing non-manifold forms. The tolerance should be chosen carefully to avoid these problems. Subclasses should handle OperateOnBounds as well as OperateOnPoint to ensure that the locator is correctly initialized (i.e. all modified points must lie inside modified bounds).
See also:
vtkQuantizePolyDataPoints
Created by:
  • Schroeder, Will
CVS contributions (if > 5%):
  • Schroeder, Will (54%)
  • Biddiscombe, John (25%)
  • Law, Charles (5%)
CVS logs (CVSweb):
  • .cxx (/Graphics/vtkCleanPolyData.cxx)
  • .h (/Graphics/vtkCleanPolyData.h)
Tests:
vtkCleanPolyData (Tests)

Definition at line 81 of file vtkCleanPolyData.h.

Public Types

typedef vtkPolyDataToPolyDataFilter Superclass

Public Member Functions

void PrintSelf (ostream &os, vtkIndent indent)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void CreateDefaultLocator (void)
void ReleaseLocator (void)
unsigned long int GetMTime ()
virtual void OperateOnPoint (double in[3], double out[3])
virtual void OperateOnBounds (double in[6], double out[6])
virtual void SetPieceInvariant (int)
virtual int GetPieceInvariant ()
virtual void PieceInvariantOn ()
virtual void PieceInvariantOff ()
virtual void SetToleranceIsAbsolute (int)
virtual void ToleranceIsAbsoluteOn ()
virtual void ToleranceIsAbsoluteOff ()
virtual int GetToleranceIsAbsolute ()
virtual void SetTolerance (double)
virtual double GetTolerance ()
virtual void SetAbsoluteTolerance (double)
virtual double GetAbsoluteTolerance ()
virtual void SetConvertLinesToPoints (int)
virtual void ConvertLinesToPointsOn ()
virtual void ConvertLinesToPointsOff ()
virtual int GetConvertLinesToPoints ()
virtual void SetConvertPolysToLines (int)
virtual void ConvertPolysToLinesOn ()
virtual void ConvertPolysToLinesOff ()
virtual int GetConvertPolysToLines ()
virtual void SetConvertStripsToPolys (int)
virtual void ConvertStripsToPolysOn ()
virtual void ConvertStripsToPolysOff ()
virtual int GetConvertStripsToPolys ()
virtual void SetPointMerging (int)
virtual int GetPointMerging ()
virtual void PointMergingOn ()
virtual void PointMergingOff ()
void SetLocator (vtkPointLocator *locator)
virtual vtkPointLocatorGetLocator ()

Static Public Member Functions

vtkCleanPolyDataNew ()
int IsTypeOf (const char *type)
vtkCleanPolyDataSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkCleanPolyData ()
 ~vtkCleanPolyData ()
void Execute ()
void ExecuteInformation ()
virtual void ComputeInputUpdateExtents (vtkDataObject *output)

Protected Attributes

int PointMerging
double Tolerance
double AbsoluteTolerance
int ConvertLinesToPoints
int ConvertPolysToLines
int ConvertStripsToPolys
int ToleranceIsAbsolute
vtkPointLocatorLocator
int PieceInvariant


Member Typedef Documentation

typedef vtkPolyDataToPolyDataFilter vtkCleanPolyData::Superclass
 

Reimplemented from vtkPolyDataToPolyDataFilter.

Reimplemented in vtkQuantizePolyDataPoints.

Definition at line 86 of file vtkCleanPolyData.h.


Constructor & Destructor Documentation

vtkCleanPolyData::vtkCleanPolyData  )  [protected]
 

vtkCleanPolyData::~vtkCleanPolyData  )  [protected]
 


Member Function Documentation

vtkCleanPolyData* vtkCleanPolyData::New  )  [static]
 

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkAlgorithm.

Reimplemented in vtkQuantizePolyDataPoints.

void vtkCleanPolyData::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 vtkPolyDataToPolyDataFilter.

Reimplemented in vtkQuantizePolyDataPoints.

virtual const char* vtkCleanPolyData::GetClassName  )  [virtual]
 

Reimplemented from vtkPolyDataToPolyDataFilter.

Reimplemented in vtkQuantizePolyDataPoints.

int vtkCleanPolyData::IsTypeOf const char *  type  )  [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataToPolyDataFilter.

Reimplemented in vtkQuantizePolyDataPoints.

virtual int vtkCleanPolyData::IsA const char *  type  )  [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataToPolyDataFilter.

Reimplemented in vtkQuantizePolyDataPoints.

vtkCleanPolyData* vtkCleanPolyData::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkPolyDataToPolyDataFilter.

Reimplemented in vtkQuantizePolyDataPoints.

virtual void vtkCleanPolyData::SetToleranceIsAbsolute int   )  [virtual]
 

By default ToleranceIsAbsolute is false and Tolerance is a fraction of Bounding box diagonal, if true, AbsoluteTolerance is used when adding points to locator (merging)

virtual void vtkCleanPolyData::ToleranceIsAbsoluteOn  )  [virtual]
 

By default ToleranceIsAbsolute is false and Tolerance is a fraction of Bounding box diagonal, if true, AbsoluteTolerance is used when adding points to locator (merging)

virtual void vtkCleanPolyData::ToleranceIsAbsoluteOff  )  [virtual]
 

By default ToleranceIsAbsolute is false and Tolerance is a fraction of Bounding box diagonal, if true, AbsoluteTolerance is used when adding points to locator (merging)

virtual int vtkCleanPolyData::GetToleranceIsAbsolute  )  [virtual]
 

By default ToleranceIsAbsolute is false and Tolerance is a fraction of Bounding box diagonal, if true, AbsoluteTolerance is used when adding points to locator (merging)

virtual void vtkCleanPolyData::SetTolerance double   )  [virtual]
 

Specify tolerance in terms of fraction of bounding box length.

virtual double vtkCleanPolyData::GetTolerance  )  [virtual]
 

Specify tolerance in terms of fraction of bounding box length.

virtual void vtkCleanPolyData::SetAbsoluteTolerance double   )  [virtual]
 

Specify tolerance in absolute terms

virtual double vtkCleanPolyData::GetAbsoluteTolerance  )  [virtual]
 

Specify tolerance in absolute terms

virtual void vtkCleanPolyData::SetConvertLinesToPoints int   )  [virtual]
 

Turn on/off conversion of degenerate lines to points

virtual void vtkCleanPolyData::ConvertLinesToPointsOn  )  [virtual]
 

Turn on/off conversion of degenerate lines to points

virtual void vtkCleanPolyData::ConvertLinesToPointsOff  )  [virtual]
 

Turn on/off conversion of degenerate lines to points

virtual int vtkCleanPolyData::GetConvertLinesToPoints  )  [virtual]
 

Turn on/off conversion of degenerate lines to points

virtual void vtkCleanPolyData::SetConvertPolysToLines int   )  [virtual]
 

Turn on/off conversion of degenerate polys to lines

virtual void vtkCleanPolyData::ConvertPolysToLinesOn  )  [virtual]
 

Turn on/off conversion of degenerate polys to lines

virtual void vtkCleanPolyData::ConvertPolysToLinesOff  )  [virtual]
 

Turn on/off conversion of degenerate polys to lines

virtual int vtkCleanPolyData::GetConvertPolysToLines  )  [virtual]
 

Turn on/off conversion of degenerate polys to lines

virtual void vtkCleanPolyData::SetConvertStripsToPolys int   )  [virtual]
 

Turn on/off conversion of degenerate strips to polys

virtual void vtkCleanPolyData::ConvertStripsToPolysOn  )  [virtual]
 

Turn on/off conversion of degenerate strips to polys

virtual void vtkCleanPolyData::ConvertStripsToPolysOff  )  [virtual]
 

Turn on/off conversion of degenerate strips to polys

virtual int vtkCleanPolyData::GetConvertStripsToPolys  )  [virtual]
 

Turn on/off conversion of degenerate strips to polys

virtual void vtkCleanPolyData::SetPointMerging int   )  [virtual]
 

Set/Get a boolean value that controls whether point merging is performed. If on, a locator will be used, and points laying within the appropriate tolerance may be merged. If off, points are never merged. By default, merging is on.

virtual int vtkCleanPolyData::GetPointMerging  )  [virtual]
 

Set/Get a boolean value that controls whether point merging is performed. If on, a locator will be used, and points laying within the appropriate tolerance may be merged. If off, points are never merged. By default, merging is on.

virtual void vtkCleanPolyData::PointMergingOn  )  [virtual]
 

Set/Get a boolean value that controls whether point merging is performed. If on, a locator will be used, and points laying within the appropriate tolerance may be merged. If off, points are never merged. By default, merging is on.

virtual void vtkCleanPolyData::PointMergingOff  )  [virtual]
 

Set/Get a boolean value that controls whether point merging is performed. If on, a locator will be used, and points laying within the appropriate tolerance may be merged. If off, points are never merged. By default, merging is on.

void vtkCleanPolyData::SetLocator vtkPointLocator locator  ) 
 

Set/Get a spatial locator for speeding the search process. By default an instance of vtkMergePoints is used.

virtual vtkPointLocator* vtkCleanPolyData::GetLocator  )  [virtual]
 

Set/Get a spatial locator for speeding the search process. By default an instance of vtkMergePoints is used.

void vtkCleanPolyData::CreateDefaultLocator void   ) 
 

Create default locator. Used to create one when none is specified.

void vtkCleanPolyData::ReleaseLocator void   ) 
 

Release locator

unsigned long int vtkCleanPolyData::GetMTime  )  [virtual]
 

Get the MTime of this object also considering the locator.

Reimplemented from vtkObject.

virtual void vtkCleanPolyData::OperateOnPoint double  in[3],
double  out[3]
[virtual]
 

Perform operation on a point

Reimplemented in vtkQuantizePolyDataPoints.

virtual void vtkCleanPolyData::OperateOnBounds double  in[6],
double  out[6]
[virtual]
 

Perform operation on bounds

Reimplemented in vtkQuantizePolyDataPoints.

virtual void vtkCleanPolyData::SetPieceInvariant int   )  [virtual]
 

virtual int vtkCleanPolyData::GetPieceInvariant  )  [virtual]
 

virtual void vtkCleanPolyData::PieceInvariantOn  )  [virtual]
 

virtual void vtkCleanPolyData::PieceInvariantOff  )  [virtual]
 

void vtkCleanPolyData::Execute  )  [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.

void vtkCleanPolyData::ExecuteInformation  )  [protected, virtual]
 

Reimplemented from vtkSource.

virtual void vtkCleanPolyData::ComputeInputUpdateExtents vtkDataObject output  )  [protected, virtual]
 

What is the input update extent that is required to produce the desired output? By default, the whole input is always required but this is overridden in many subclasses.

Reimplemented from vtkPolyDataSource.


Member Data Documentation

int vtkCleanPolyData::PointMerging [protected]
 

Definition at line 180 of file vtkCleanPolyData.h.

double vtkCleanPolyData::Tolerance [protected]
 

Definition at line 181 of file vtkCleanPolyData.h.

double vtkCleanPolyData::AbsoluteTolerance [protected]
 

Definition at line 182 of file vtkCleanPolyData.h.

int vtkCleanPolyData::ConvertLinesToPoints [protected]
 

Definition at line 183 of file vtkCleanPolyData.h.

int vtkCleanPolyData::ConvertPolysToLines [protected]
 

Definition at line 184 of file vtkCleanPolyData.h.

int vtkCleanPolyData::ConvertStripsToPolys [protected]
 

Definition at line 185 of file vtkCleanPolyData.h.

int vtkCleanPolyData::ToleranceIsAbsolute [protected]
 

Definition at line 186 of file vtkCleanPolyData.h.

vtkPointLocator* vtkCleanPolyData::Locator [protected]
 

Definition at line 187 of file vtkCleanPolyData.h.

int vtkCleanPolyData::PieceInvariant [protected]
 

Definition at line 189 of file vtkCleanPolyData.h.


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