vtkDecimate - reduce the number of triangles in a mesh
Super Class: vtkPolyDataToPolyDataFilter
Description:
vtkDecimate is a filter to reduce the number of triangles in a triangle mesh, while preserving the original topology and a forming good approximation to the original geometry. The input to vtkDecimate is a vtkPolyData object, and only triangles are treated. If you desire to decimate polygonal meshes, first triangulate the polygons with the vtkTriangleFilter object. The algorithm proceeds as follows. Each vertex in the triangle list is evaluated for local planarity (i.e., the triangles using the vertex are gathered and compared to an "average" plane). If the region is locally planar, that is if the target vertex is within a certain distance of the average plane (i.e., the error), and there are no edges radiating from the vertex that have a dihedral angle greater than a user-specified edge angle (i.e., feature angle), and topology is not altered, then that vertex is deleted. The resulting hole is then patched by re-triangulation. The process continues over the entire vertex list (this constitutes an iteration). Iterations proceed until a target reduction is reached or a maximum iteration count is exceeded. There are a number of additional parameters you can set to control the decimation algorithm. The Error ivar may be increased over each iteration with the ErrorIncrement. (These two variables have the largest effect.) Edge preservation (i.e., PreserveEdges ivar) may be disabled or enabled. You can turn on/off edge vertex deletion (i.e., BoundaryVertexDeletion ivar). (Edge vertices are vertices that lie along boundaries of meshes.) Sub iterations are iterations that are performed without changing the decimation criterion. The AspectRatio ivar controls the shape of the triangles that are created, and is the ratio of maximum edge length to minimum edge length. The Degree is the number of triangles using a single vertex. Vertices of high degree are considered "complex" and are never deleted.
Caveats:
This implementation has been adapted for a global error bound decimation criterion. That is, the error is a global bound on distance to original surface. This is an improvement over the original Siggraph paper ("Decimation of Triangle Meshes", Proc Siggraph `92.) The algorithm has been extended with a special flag to allow topology modification. When the PreserveTopology flag is on, then the algorithm will preserve the topology of the original mesh. If off, the algorithm may close holes and/or collapse tunnels (i.e., form non-manifold attachments).
See Also:
Methods:
Detailed Method Descriptions:
void SetInitialError (float ) | |
float GetInitialError () |
void SetErrorIncrement (float ) | |
float GetErrorIncrement () |
void SetMaximumError (float ) | |
float GetMaximumError () |
void SetTargetReduction (float ) | |
float GetTargetReduction () |
void SetMaximumIterations (int ) | |
int GetMaximumIterations () |
void SetMaximumSubIterations (int ) | |
int GetMaximumSubIterations () |
void SetInitialFeatureAngle (float ) | |
float GetInitialFeatureAngle () |
void SetFeatureAngleIncrement (float ) | |
float GetFeatureAngleIncrement () |
void SetMaximumFeatureAngle (float ) | |
float GetMaximumFeatureAngle () |
void SetPreserveEdges (int ) | |
int GetPreserveEdges () | |
void PreserveEdgesOn () | |
void PreserveEdgesOff () |
void SetBoundaryVertexDeletion (int ) | |
int GetBoundaryVertexDeletion () | |
void BoundaryVertexDeletionOn () | |
void BoundaryVertexDeletionOff () |
void SetAspectRatio (float ) | |
float GetAspectRatio () |
void SetDegree (int ) | |
int GetDegree () |
void SetMaximumNumberOfSquawks (int ) | |
int GetMaximumNumberOfSquawks () |