Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkDelaunay3D Class Reference

create 3D Delaunay triangulation of input points. More...

#include <vtkDelaunay3D.h>

Inheritance diagram for vtkDelaunay3D:

Inheritance graph
[legend]
Collaboration diagram for vtkDelaunay3D:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetAlpha (float)
virtual float GetAlpha ()
virtual void SetTolerance (float)
virtual float GetTolerance ()
virtual void SetOffset (float)
virtual float GetOffset ()
virtual void SetBoundingTriangulation (int)
virtual int GetBoundingTriangulation ()
virtual void BoundingTriangulationOn ()
virtual void BoundingTriangulationOff ()
void SetLocator (vtkPointLocator *locator)
virtual vtkPointLocatorGetLocator ()
void CreateDefaultLocator ()
vtkUnstructuredGridInitPointInsertion (float center[3], float length, int numPts, vtkPoints *&pts)
vtkUnstructuredGridInitPointInsertion (int numPtsToInsert, int numTetra, vtkPoints *boundingTetraPts, float bounds[6], vtkPoints *&pts)
void InsertPoint (vtkUnstructuredGrid *Mesh, vtkPoints *points, int id, float x[3], vtkIdList *holeTetras)
void EndPointInsertion ()
unsigned long GetMTime ()
virtual void SetInput (vtkPointSet *input)
vtkPointSetGetInput ()
void SetLocator (vtkPointLocator &locator)
vtkUnstructuredGridInitPointInsertion (int numPtsToInsert, int numTetra, vtkPoints &boundingTetraPts, float bounds[6], vtkPoints *&pts)
void InsertPoint (vtkUnstructuredGrid *Mesh, vtkPoints *points, int id, float x[3], vtkIdList &holeTetras)

Static Public Methods

int IsTypeOf (const char *type)
vtkDelaunay3D * SafeDownCast (vtkObject *o)
vtkDelaunay3D * New ()

Protected Methods

 vtkDelaunay3D ()
 ~vtkDelaunay3D ()
 vtkDelaunay3D (const vtkDelaunay3D &)
void operator= (const vtkDelaunay3D &)
void Execute ()
int FindTetra (vtkUnstructuredGrid *Mesh, double x[3], int tetId, int depth)
int InSphere (double x[3], int tetraId)
void InsertTetra (vtkUnstructuredGrid *Mesh, vtkPoints *pts, int tetraId)
int FindEnclosingFaces (float x[3], vtkUnstructuredGrid *Mesh, vtkIdList *tetras, vtkIdList *faces, vtkPointLocator *Locator)

Protected Attributes

float Alpha
float Tolerance
int BoundingTriangulation
float Offset
vtkPointLocatorLocator
vtkTetraArray * TetraArray
int NumberOfDuplicatePoints
int NumberOfDegeneracies
int * References

Detailed Description

create 3D Delaunay triangulation of input points.

Date:
2000/12/10 20:08:35
Revision:
1.37

vtkDelaunay3D is a filter that constructs a 3D Delaunay triangulation from a list of input points. These points may be represented by any dataset of type vtkPointSet and subclasses. The output of the filter is an unstructured grid dataset. Usually the output is a tetrahedral mesh, but if a non-zero alpha distance value is specified (called the "alpha" value), then only tetrahedra, triangles, edges, and vertices lying within the alpha radius are output. In other words, non-zero alpha values may result in arbitrary combinations of tetrahedra, triangles, lines, and vertices. (The notion of alpha value is derived from Edelsbrunner's work on "alpha shapes".)

The 3D Delaunay triangulation is defined as the triangulation that satisfies the Delaunay criterion for n-dimensional simplexes (in this case n=3 and the simplexes are tetrahedra). This criterion states that a circumsphere of each simplex in a triangulation contains only the n+1 defining points of the simplex. (See text for more information.) While in two dimensions this translates into an "optimal" triangulation, this is not true in 3D, since a measurement for optimality in 3D is not agreed on.

Delaunay triangulations are used to build topological structures from unorganized (or unstructured) points. The input to this filter is a list of points specified in 3D. (If you wish to create 2D triangulations see vtkDelaunay2D.) The output is an unstructured grid.

The Delaunay triangulation can be numerically sensitive. To prevent problems, try to avoid injecting points that will result in triangles with bad aspect ratios (1000:1 or greater). In practice this means inserting points that are "widely dispersed", and enables smooth transition of triangle sizes throughout the mesh. (You may even want to add extra points to create a better point distribution.) If numerical problems are present, you will see a warning message to this effect at the end of the triangulation process.

Warning:
Points arranged on a regular lattice (termed degenerate cases) can be triangulated in more than one way (at least according to the Delaunay criterion). The choice of triangulation (as implemented by this algorithm) depends on the order of the input points. The first four points will form a tetrahedron; other degenerate points (relative to this initial tetrahedron) will not break it.
Warning:
Points that are coincident (or nearly so) may be discarded by the algorithm. This is because the Delaunay triangulation requires unique input points. You can control the definition of coincidence with the "Tolerance" instance variable.
Warning:
The output of the Delaunay triangulation is supposedly a convex hull. In certain cases this implementation may not generate the convex hull. This behavior can be controlled by the Offset instance variable. Offset is a multiplier used to control the size of the initial triangulation. The larger the offset value, the more likely you will generate a convex hull; and the more likely you are to see numerical problems.
Warning:
The implementation of this algorithm varies from the 2D Delaunay algorithm (i.e., vtkDelaunay2D) in an important way. When points are injected into the triangulation, the search for the enclosing tetrahedron is quite different. In the 3D case, the closest previously inserted point point is found, and then the connected tetrahedra are searched to find the containing one. (In 2D, a "walk" towards the enclosing triangle is performed.) If the triangulation is Delaunay, then an
See also:
vtkDelaunay2D vtkGaussianSplatter vtkUnstructuredGrid
Examples:
vtkDelaunay3D (examples)

Definition at line 125 of file vtkDelaunay3D.h.


Constructor & Destructor Documentation

vtkDelaunay3D::vtkDelaunay3D   [protected]
 

vtkDelaunay3D::~vtkDelaunay3D   [protected]
 

vtkDelaunay3D::vtkDelaunay3D const vtkDelaunay3D &    [inline, protected]
 

Definition at line 242 of file vtkDelaunay3D.h.


Member Function Documentation

virtual const char* vtkDelaunay3D::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkUnstructuredGridSource.

int vtkDelaunay3D::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkUnstructuredGridSource.

virtual int vtkDelaunay3D::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkUnstructuredGridSource.

vtkDelaunay3D* vtkDelaunay3D::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkUnstructuredGridSource.

void vtkDelaunay3D::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 vtkSource.

vtkDelaunay3D* vtkDelaunay3D::New   [static]
 

Construct object with Alpha = 0.0; Tolerance = 0.001; Offset = 2.5; BoundingTriangulation turned off.

Reimplemented from vtkUnstructuredGridSource.

virtual void vtkDelaunay3D::SetAlpha float    [virtual]
 

Specify alpha (or distance) value to control output of this filter. For a non-zero alpha value, only edges, faces, or tetra contained within the circumsphere (of radius alpha) will be output. Otherwise, only tetrahedra will be output.

virtual float vtkDelaunay3D::GetAlpha   [virtual]
 

virtual void vtkDelaunay3D::SetTolerance float    [virtual]
 

Specify a tolerance to control discarding of closely spaced points. This tolerance is specified as a fraction of the diagonal length of the bounding box of the points.

virtual float vtkDelaunay3D::GetTolerance   [virtual]
 

virtual void vtkDelaunay3D::SetOffset float    [virtual]
 

Specify a multiplier to control the size of the initial, bounding Delaunay triangulation.

virtual float vtkDelaunay3D::GetOffset   [virtual]
 

virtual void vtkDelaunay3D::SetBoundingTriangulation int    [virtual]
 

Boolean controls whether bounding triangulation points (and associated triangles) are included in the output. (These are introduced as an initial triangulation to begin the triangulation process. This feature is nice for debugging output.)

virtual int vtkDelaunay3D::GetBoundingTriangulation   [virtual]
 

virtual void vtkDelaunay3D::BoundingTriangulationOn   [virtual]
 

virtual void vtkDelaunay3D::BoundingTriangulationOff   [virtual]
 

void vtkDelaunay3D::SetLocator vtkPointLocator   locator
 

Set / get a spatial locator for merging points. By default, an instance of vtkPointLocator is used.

virtual vtkPointLocator* vtkDelaunay3D::GetLocator   [virtual]
 

void vtkDelaunay3D::CreateDefaultLocator void   
 

Create default locator. Used to create one when none is specified. The locator is used to eliminate "coincident" points.

vtkUnstructuredGrid* vtkDelaunay3D::InitPointInsertion float    center[3],
float    length,
int    numPts,
vtkPoints *&    pts
 

This is a helper method used with InsertPoint() to create tetrahedronalizations of points. Its purpose is construct an initial Delaunay triangulation into which to inject other points. You must specify the center of a cubical bounding box and its length, as well as the number of points to insert. The method returns a pointer to an unstructured grid. Use this pointer to manipulate the mesh as necessary. You must delete (with Delete()) the mesh when done. Note: This initialization method places points forming bounding octahedron at the end of the Mesh's point list. That is, InsertPoint() assumes that you will be inserting points between (0,numPtsToInsert-1).

vtkUnstructuredGrid* vtkDelaunay3D::InitPointInsertion int    numPtsToInsert,
int    numTetra,
vtkPoints   boundingTetraPts,
float    bounds[6],
vtkPoints *&    pts
 

This is a helper method used with InsertPoint() to create tetrahedronalizations of points. Its purpose is construct an initial Delaunay triangulation into which to inject other points. You must specify the number of points you wish to insert, and then define an initial Delaunay tetrahedronalization. This is defined by specifying the number of tetrahedra, and a list of points coordinates defining the tetra (total of 4*numTetra points). The method returns a pointer to an unstructured grid. Use this pointer to manipulate the mesh as necessary. You must delete (with Delete()) the mesh when done. Note: The points you insert using InsertPoint() will range from (0,numPtsToInsert-1). Make sure that numPtsToInsert is large enough to accommodate this.

void vtkDelaunay3D::InsertPoint vtkUnstructuredGrid   Mesh,
vtkPoints   points,
int    id,
float    x[3],
vtkIdList   holeTetras
 

This is a helper method used with InitPointInsertion() to create tetrahedronalizations of points. Its purpose is to inject point at coordinates specified into tetrahedronalization. The point id is an index into the list of points in the mesh structure. (See vtkDelaunay3D::InitPointInsertion() for more information.) When you have completed inserting points, traverse the mesh structure to extract desired tetrahedra (or tetra faces and edges).The holeTetras id list lists all the tetrahedra that are deleted (invalid) in the mesh structure.

void vtkDelaunay3D::EndPointInsertion  
 

Invoke this method after all points have been inserted. The purpose of the method is to clean up internal data structures. Note that the (vtkUnstructuredGrid *)Mesh returned from InitPointInsertion() is NOT deleted, you still are responsible for cleaning that up.

unsigned long vtkDelaunay3D::GetMTime   [virtual]
 

Return the MTime also considering the locator.

Reimplemented from vtkObject.

virtual void vtkDelaunay3D::SetInput vtkPointSet   input [virtual]
 

Set / get the input data or filter.

vtkPointSet* vtkDelaunay3D::GetInput  
 

void vtkDelaunay3D::SetLocator vtkPointLocator   locator [inline]
 

For legacy compatibility. Do not use.

Definition at line 226 of file vtkDelaunay3D.h.

vtkUnstructuredGrid* vtkDelaunay3D::InitPointInsertion int    numPtsToInsert,
int    numTetra,
vtkPoints   boundingTetraPts,
float    bounds[6],
vtkPoints *&    pts
[inline]
 

Definition at line 228 of file vtkDelaunay3D.h.

void vtkDelaunay3D::InsertPoint vtkUnstructuredGrid   Mesh,
vtkPoints   points,
int    id,
float    x[3],
vtkIdList   holeTetras
[inline]
 

Definition at line 234 of file vtkDelaunay3D.h.

void vtkDelaunay3D::operator= const vtkDelaunay3D &    [inline, protected]
 

Definition at line 243 of file vtkDelaunay3D.h.

void vtkDelaunay3D::Execute   [protected, virtual]
 

Reimplemented from vtkSource.

int vtkDelaunay3D::FindTetra vtkUnstructuredGrid   Mesh,
double    x[3],
int    tetId,
int    depth
[protected]
 

int vtkDelaunay3D::InSphere double    x[3],
int    tetraId
[protected]
 

void vtkDelaunay3D::InsertTetra vtkUnstructuredGrid   Mesh,
vtkPoints   pts,
int    tetraId
[protected]
 

int vtkDelaunay3D::FindEnclosingFaces float    x[3],
vtkUnstructuredGrid   Mesh,
vtkIdList   tetras,
vtkIdList   faces,
vtkPointLocator   Locator
[protected]
 


Member Data Documentation

float vtkDelaunay3D::Alpha [protected]
 

Definition at line 247 of file vtkDelaunay3D.h.

float vtkDelaunay3D::Tolerance [protected]
 

Definition at line 248 of file vtkDelaunay3D.h.

int vtkDelaunay3D::BoundingTriangulation [protected]
 

Definition at line 249 of file vtkDelaunay3D.h.

float vtkDelaunay3D::Offset [protected]
 

Definition at line 250 of file vtkDelaunay3D.h.

vtkPointLocator* vtkDelaunay3D::Locator [protected]
 

Definition at line 252 of file vtkDelaunay3D.h.

vtkTetraArray* vtkDelaunay3D::TetraArray [protected]
 

Definition at line 254 of file vtkDelaunay3D.h.

int vtkDelaunay3D::NumberOfDuplicatePoints [protected]
 

Definition at line 259 of file vtkDelaunay3D.h.

int vtkDelaunay3D::NumberOfDegeneracies [protected]
 

Definition at line 260 of file vtkDelaunay3D.h.

int* vtkDelaunay3D::References [protected]
 

Definition at line 263 of file vtkDelaunay3D.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 12:47:31 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001