VTK
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkDecimatePro Class Reference

reduce the number of triangles in a mesh More...

#include <vtkDecimatePro.h>

Inheritance diagram for vtkDecimatePro:
[legend]
Collaboration diagram for vtkDecimatePro:
[legend]

Classes

class  LocalTri
 
class  LocalVertex
 
class  TriArray
 
class  VertexArray
 

Public Types

typedef vtkPolyDataAlgorithm Superclass
 
- Public Types inherited from vtkPolyDataAlgorithm
typedef vtkAlgorithm Superclass
 
- Public Types inherited from vtkAlgorithm
typedef vtkObject Superclass
 
enum  DesiredOutputPrecision { SINGLE_PRECISION, DOUBLE_PRECISION, DEFAULT_PRECISION }
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkDecimateProNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
vtkIdType GetNumberOfInflectionPoints ()
 
void GetInflectionPoints (double *inflectionPoints)
 
doubleGetInflectionPoints ()
 
virtual void SetTargetReduction (double)
 
virtual double GetTargetReduction ()
 
virtual void SetPreserveTopology (int)
 
virtual int GetPreserveTopology ()
 
virtual void PreserveTopologyOn ()
 
virtual void PreserveTopologyOff ()
 
virtual void SetFeatureAngle (double)
 
virtual double GetFeatureAngle ()
 
virtual void SetSplitting (int)
 
virtual int GetSplitting ()
 
virtual void SplittingOn ()
 
virtual void SplittingOff ()
 
virtual void SetSplitAngle (double)
 
virtual double GetSplitAngle ()
 
virtual void SetPreSplitMesh (int)
 
virtual int GetPreSplitMesh ()
 
virtual void PreSplitMeshOn ()
 
virtual void PreSplitMeshOff ()
 
virtual void SetMaximumError (double)
 
virtual double GetMaximumError ()
 
virtual void SetAccumulateError (int)
 
virtual int GetAccumulateError ()
 
virtual void AccumulateErrorOn ()
 
virtual void AccumulateErrorOff ()
 
virtual void SetErrorIsAbsolute (int)
 
virtual int GetErrorIsAbsolute ()
 
virtual void SetAbsoluteError (double)
 
virtual double GetAbsoluteError ()
 
virtual void SetBoundaryVertexDeletion (int)
 
virtual int GetBoundaryVertexDeletion ()
 
virtual void BoundaryVertexDeletionOn ()
 
virtual void BoundaryVertexDeletionOff ()
 
virtual void SetDegree (int)
 
virtual int GetDegree ()
 
virtual void SetInflectionPointRatio (double)
 
virtual double GetInflectionPointRatio ()
 
virtual void SetOutputPointsPrecision (int)
 
virtual int GetOutputPointsPrecision ()
 
- Public Member Functions inherited from vtkPolyDataAlgorithm
vtkPolyDataAlgorithmNewInstance () const
 
vtkDataObjectGetInput ()
 
vtkDataObjectGetInput (int port)
 
vtkPolyDataGetPolyDataInput (int port)
 
vtkPolyDataGetOutput ()
 
vtkPolyDataGetOutput (int)
 
virtual void SetOutput (vtkDataObject *d)
 
virtual int ProcessRequest (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
void SetInputData (vtkDataObject *)
 
void SetInputData (int, vtkDataObject *)
 
void AddInputData (vtkDataObject *)
 
void AddInputData (int, vtkDataObject *)
 
- Public Member Functions inherited from vtkAlgorithm
vtkAlgorithmNewInstance () const
 
int HasExecutive ()
 
vtkExecutiveGetExecutive ()
 
virtual void SetExecutive (vtkExecutive *executive)
 
virtual int ModifyRequest (vtkInformation *request, int when)
 
vtkInformationGetInputPortInformation (int port)
 
vtkInformationGetOutputPortInformation (int port)
 
int GetNumberOfInputPorts ()
 
int GetNumberOfOutputPorts ()
 
void UpdateProgress (double amount)
 
vtkInformationGetInputArrayInformation (int idx)
 
void RemoveAllInputs ()
 
vtkDataObjectGetOutputDataObject (int port)
 
virtual void RemoveInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void RemoveInputConnection (int port, int idx)
 
virtual void RemoveAllInputConnections (int port)
 
int GetNumberOfInputConnections (int port)
 
int GetTotalNumberOfInputConnections ()
 
vtkAlgorithmOutputGetInputConnection (int port, int index)
 
vtkAlgorithmGetInputAlgorithm (int port, int index, int &algPort)
 
vtkAlgorithmGetInputAlgorithm (int port, int index)
 
vtkExecutiveGetInputExecutive (int port, int index)
 
vtkInformationGetInputInformation (int port, int index)
 
vtkInformationGetOutputInformation (int port)
 
virtual void UpdateInformation ()
 
virtual void UpdateDataObject ()
 
virtual void PropagateUpdateExtent ()
 
virtual void UpdateWholeExtent ()
 
void ConvertTotalInputToPortConnection (int ind, int &port, int &conn)
 
int SetUpdateExtentToWholeExtent (int port)
 
int SetUpdateExtentToWholeExtent ()
 
void SetUpdateExtent (int port, int extent[6])
 
int ProcessRequest (vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
 
virtual int ComputePipelineMTime (vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, unsigned long *mtime)
 
virtual vtkInformationGetInformation ()
 
virtual void SetInformation (vtkInformation *)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
virtual void SetAbortExecute (int)
 
virtual int GetAbortExecute ()
 
virtual void AbortExecuteOn ()
 
virtual void AbortExecuteOff ()
 
virtual void SetProgress (double)
 
virtual double GetProgress ()
 
void SetProgressText (const char *ptext)
 
virtual char * GetProgressText ()
 
virtual unsigned long GetErrorCode ()
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
 
virtual void SetInputArrayToProcess (int idx, vtkInformation *info)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
 
vtkDataObjectGetInputDataObject (int port, int connection)
 
virtual void SetInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void SetInputConnection (vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (vtkAlgorithmOutput *input)
 
virtual void SetInputDataObject (int port, vtkDataObject *data)
 
virtual void SetInputDataObject (vtkDataObject *data)
 
virtual void AddInputDataObject (int port, vtkDataObject *data)
 
virtual void AddInputDataObject (vtkDataObject *data)
 
vtkAlgorithmOutputGetOutputPort (int index)
 
vtkAlgorithmOutputGetOutputPort ()
 
vtkAlgorithmGetInputAlgorithm ()
 
vtkExecutiveGetInputExecutive ()
 
vtkInformationGetInputInformation ()
 
virtual void Update (int port)
 
virtual void Update ()
 
virtual void SetReleaseDataFlag (int)
 
virtual int GetReleaseDataFlag ()
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, vtkDataObject *output)
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType)
 
void SetUpdateExtent (int port, int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int extent[6])
 
intGetUpdateExtent ()
 
intGetUpdateExtent (int port)
 
void GetUpdateExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int extent[6])
 
void GetUpdateExtent (int port, int extent[6])
 
int GetUpdatePiece ()
 
int GetUpdatePiece (int port)
 
int GetUpdateNumberOfPieces ()
 
int GetUpdateNumberOfPieces (int port)
 
int GetUpdateGhostLevel ()
 
int GetUpdateGhostLevel (int port)
 
void SetProgressObserver (vtkProgressObserver *)
 
virtual vtkProgressObserverGetProgressObserver ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkDecimateProSafeDownCast (vtkObjectBase *o)
 
static vtkDecimateProNew ()
 
- Static Public Member Functions inherited from vtkPolyDataAlgorithm
static vtkPolyDataAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPolyDataAlgorithmSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAlgorithm
static vtkAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static vtkAlgorithmSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKeyINPUT_IS_OPTIONAL ()
 
static vtkInformationIntegerKeyINPUT_IS_REPEATABLE ()
 
static vtkInformationInformationVectorKeyINPUT_REQUIRED_FIELDS ()
 
static vtkInformationStringVectorKeyINPUT_REQUIRED_DATA_TYPE ()
 
static vtkInformationInformationVectorKeyINPUT_ARRAYS_TO_PROCESS ()
 
static vtkInformationIntegerKeyINPUT_PORT ()
 
static vtkInformationIntegerKeyINPUT_CONNECTION ()
 
static vtkInformationIntegerKeyCAN_PRODUCE_SUB_EXTENT ()
 
static vtkInformationIntegerKeyCAN_HANDLE_PIECE_REQUEST ()
 
static void SetDefaultExecutivePrototype (vtkExecutive *proto)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Types

typedef LocalVertexLocalVertexPtr
 
typedef LocalTriLocalTriPtr
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkDecimatePro ()
 
 ~vtkDecimatePro ()
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
void SplitMesh ()
 
int EvaluateVertex (vtkIdType ptId, unsigned short int numTris, vtkIdType *tris, vtkIdType fedges[2])
 
vtkIdType FindSplit (int type, vtkIdType fedges[2], vtkIdType &pt1, vtkIdType &pt2, vtkIdList *CollapseTris)
 
int IsValidSplit (int index)
 
void SplitLoop (vtkIdType fedges[2], vtkIdType &n1, vtkIdType *l1, vtkIdType &n2, vtkIdType *l2)
 
void SplitVertex (vtkIdType ptId, int type, unsigned short int numTris, vtkIdType *tris, int insert)
 
int CollapseEdge (int type, vtkIdType ptId, vtkIdType collapseId, vtkIdType pt1, vtkIdType pt2, vtkIdList *CollapseTris)
 
void DistributeError (double error)
 
- Protected Member Functions inherited from vtkPolyDataAlgorithm
 vtkPolyDataAlgorithm ()
 
 ~vtkPolyDataAlgorithm ()
 
virtual int RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
virtual int FillOutputPortInformation (int port, vtkInformation *info)
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 
virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
- Protected Member Functions inherited from vtkAlgorithm
 vtkAlgorithm ()
 
 ~vtkAlgorithm ()
 
virtual void SetNumberOfInputPorts (int n)
 
virtual void SetNumberOfOutputPorts (int n)
 
int InputPortIndexInRange (int index, const char *action)
 
int OutputPortIndexInRange (int index, const char *action)
 
int GetInputArrayAssociation (int idx, vtkInformationVector **inputVector)
 
virtual vtkExecutiveCreateDefaultExecutive ()
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void SetNumberOfInputConnections (int port, int n)
 
int GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input)
 
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input)
 
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkInformationGetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector)
 
virtual void SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input)
 
void SetInputDataInternal (int port, vtkDataObject *input)
 
void AddInputDataInternal (int port, vtkDataObject *input)
 
virtual void SetErrorCode (unsigned long)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

double TargetReduction
 
double FeatureAngle
 
double MaximumError
 
double AbsoluteError
 
int ErrorIsAbsolute
 
int AccumulateError
 
double SplitAngle
 
int Splitting
 
int PreSplitMesh
 
int BoundaryVertexDeletion
 
int PreserveTopology
 
int Degree
 
double InflectionPointRatio
 
vtkDoubleArrayInflectionPoints
 
int OutputPointsPrecision
 
vtkIdListNeighbors
 
vtkPriorityQueueEdgeLengths
 
- Protected Attributes inherited from vtkAlgorithm
vtkInformationInformation
 
double Progress
 
char * ProgressText
 
vtkProgressObserverProgressObserver
 
unsigned long ErrorCode
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class VertexArray
 
class TriArray
 

Additional Inherited Members

- Public Attributes inherited from vtkAlgorithm
int AbortExecute
 
- Static Protected Member Functions inherited from vtkAlgorithm
static vtkInformationIntegerKeyPORT_REQUIREMENTS_FILLED ()
 
- Static Protected Attributes inherited from vtkAlgorithm
static vtkExecutiveDefaultExecutivePrototype
 

Detailed Description

reduce the number of triangles in a mesh

vtkDecimatePro is a filter to reduce the number of triangles in a triangle mesh, forming a good approximation to the original geometry. The input to vtkDecimatePro is a vtkPolyData object, and only triangles are treated. If you desire to decimate polygonal meshes, first triangulate the polygons with vtkTriangleFilter object.

The implementation of vtkDecimatePro is similar to the algorithm originally described in "Decimation of Triangle Meshes", Proc Siggraph `92, with three major differences. First, this algorithm does not necessarily preserve the topology of the mesh. Second, it is guaranteed to give the a mesh reduction factor specified by the user (as long as certain constraints are not set - see Caveats). Third, it is set up generate progressive meshes, that is a stream of operations that can be easily transmitted and incrementally updated (see Hugues Hoppe's Siggraph '96 paper on progressive meshes).

The algorithm proceeds as follows. Each vertex in the mesh is classified and inserted into a priority queue. The priority is based on the error to delete the vertex and retriangulate the hole. Vertices that cannot be deleted or triangulated (at this point in the algorithm) are skipped. Then, each vertex in the priority queue is processed (i.e., deleted followed by hole triangulation using edge collapse). This continues until the priority queue is empty. Next, all remaining vertices are processed, and the mesh is split into separate pieces along sharp edges or at non-manifold attachment points and reinserted into the priority queue. Again, the priority queue is processed until empty. If the desired reduction is still not achieved, the remaining vertices are split as necessary (in a recursive fashion) so that it is possible to eliminate every triangle as necessary.

To use this object, at a minimum you need to specify the ivar TargetReduction. The algorithm is guaranteed to generate a reduced mesh at this level as long as the following four conditions are met: 1) topology modification is allowed (i.e., the ivar PreserveTopology is off); 2) mesh splitting is enabled (i.e., the ivar Splitting is on); 3) the algorithm is allowed to modify the boundary of the mesh (i.e., the ivar BoundaryVertexDeletion is on); and 4) the maximum allowable error (i.e., the ivar MaximumError) is set to VTK_DOUBLE_MAX. Other important parameters to adjust include the FeatureAngle and SplitAngle ivars, since these can impact the quality of the final mesh. Also, you can set the ivar AccumulateError to force incremental error update and distribution to surrounding vertices as each vertex is deleted. The accumulated error is a conservative global error bounds and decimation error, but requires additional memory and time to compute.

Warning
To guarantee a given level of reduction, the ivar PreserveTopology must be off; the ivar Splitting is on; the ivar BoundaryVertexDeletion is on; and the ivar MaximumError is set to VTK_DOUBLE_MAX.
If PreserveTopology is off, and SplitEdges is off; the mesh topology may be modified by closing holes.
Once mesh splitting begins, the feature angle is set to the split angle.
See also
vtkDecimate vtkQuadricClustering vtkQuadricDecimation
Examples:
vtkDecimatePro (Examples)
Tests:
vtkDecimatePro (Tests)

Definition at line 96 of file vtkDecimatePro.h.

Member Typedef Documentation

Definition at line 99 of file vtkDecimatePro.h.

Definition at line 314 of file vtkDecimatePro.h.

Definition at line 324 of file vtkDecimatePro.h.

Constructor & Destructor Documentation

vtkDecimatePro::vtkDecimatePro ( )
protected
vtkDecimatePro::~vtkDecimatePro ( )
protected

Member Function Documentation

static int vtkDecimatePro::IsTypeOf ( const char *  type)
static
virtual int vtkDecimatePro::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 vtkPolyDataAlgorithm.

static vtkDecimatePro* vtkDecimatePro::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkDecimatePro::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkPolyDataAlgorithm.

vtkDecimatePro* vtkDecimatePro::NewInstance ( ) const
void vtkDecimatePro::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 vtkPolyDataAlgorithm.

static vtkDecimatePro* vtkDecimatePro::New ( )
static

Create object with specified reduction of 90% and feature angle of 15 degrees. Edge splitting is on, defer splitting is on, and the split angle is 75 degrees. Topology preservation is off, delete boundary vertices is on, and the maximum error is set to VTK_DOUBLE_MAX. The inflection point ratio is 10 and the vertex degree is 25. Error accumulation is turned off.

virtual void vtkDecimatePro::SetTargetReduction ( double  )
virtual

Specify the desired reduction in the total number of polygons (e.g., if TargetReduction is set to 0.9, this filter will try to reduce the data set to 10% of its original size). Because of various constraints, this level of reduction may not be realized. If you want to guarantee a particular reduction, you must turn off PreserveTopology, turn on SplitEdges and BoundaryVertexDeletion, and set the MaximumError to VTK_DOUBLE_MAX (these ivars are initialized this way when the object is instantiated).

virtual double vtkDecimatePro::GetTargetReduction ( )
virtual

Specify the desired reduction in the total number of polygons (e.g., if TargetReduction is set to 0.9, this filter will try to reduce the data set to 10% of its original size). Because of various constraints, this level of reduction may not be realized. If you want to guarantee a particular reduction, you must turn off PreserveTopology, turn on SplitEdges and BoundaryVertexDeletion, and set the MaximumError to VTK_DOUBLE_MAX (these ivars are initialized this way when the object is instantiated).

virtual void vtkDecimatePro::SetPreserveTopology ( int  )
virtual

Turn on/off whether to preserve the topology of the original mesh. If on, mesh splitting and hole elimination will not occur. This may limit the maximum reduction that may be achieved.

virtual int vtkDecimatePro::GetPreserveTopology ( )
virtual

Turn on/off whether to preserve the topology of the original mesh. If on, mesh splitting and hole elimination will not occur. This may limit the maximum reduction that may be achieved.

virtual void vtkDecimatePro::PreserveTopologyOn ( )
virtual

Turn on/off whether to preserve the topology of the original mesh. If on, mesh splitting and hole elimination will not occur. This may limit the maximum reduction that may be achieved.

virtual void vtkDecimatePro::PreserveTopologyOff ( )
virtual

Turn on/off whether to preserve the topology of the original mesh. If on, mesh splitting and hole elimination will not occur. This may limit the maximum reduction that may be achieved.

virtual void vtkDecimatePro::SetFeatureAngle ( double  )
virtual

Specify the mesh feature angle. This angle is used to define what an edge is (i.e., if the surface normal between two adjacent triangles is >= FeatureAngle, an edge exists).

virtual double vtkDecimatePro::GetFeatureAngle ( )
virtual

Specify the mesh feature angle. This angle is used to define what an edge is (i.e., if the surface normal between two adjacent triangles is >= FeatureAngle, an edge exists).

virtual void vtkDecimatePro::SetSplitting ( int  )
virtual

Turn on/off the splitting of the mesh at corners, along edges, at non-manifold points, or anywhere else a split is required. Turning splitting off will better preserve the original topology of the mesh, but you may not obtain the requested reduction.

virtual int vtkDecimatePro::GetSplitting ( )
virtual

Turn on/off the splitting of the mesh at corners, along edges, at non-manifold points, or anywhere else a split is required. Turning splitting off will better preserve the original topology of the mesh, but you may not obtain the requested reduction.

virtual void vtkDecimatePro::SplittingOn ( )
virtual

Turn on/off the splitting of the mesh at corners, along edges, at non-manifold points, or anywhere else a split is required. Turning splitting off will better preserve the original topology of the mesh, but you may not obtain the requested reduction.

virtual void vtkDecimatePro::SplittingOff ( )
virtual

Turn on/off the splitting of the mesh at corners, along edges, at non-manifold points, or anywhere else a split is required. Turning splitting off will better preserve the original topology of the mesh, but you may not obtain the requested reduction.

virtual void vtkDecimatePro::SetSplitAngle ( double  )
virtual

Specify the mesh split angle. This angle is used to control the splitting of the mesh. A split line exists when the surface normals between two edge connected triangles are >= SplitAngle.

virtual double vtkDecimatePro::GetSplitAngle ( )
virtual

Specify the mesh split angle. This angle is used to control the splitting of the mesh. A split line exists when the surface normals between two edge connected triangles are >= SplitAngle.

virtual void vtkDecimatePro::SetPreSplitMesh ( int  )
virtual

In some cases you may wish to split the mesh prior to algorithm execution. This separates the mesh into semi-planar patches, which are disconnected from each other. This can give superior results in some cases. If the ivar PreSplitMesh ivar is enabled, the mesh is split with the specified SplitAngle. Otherwise mesh splitting is deferred as long as possible.

virtual int vtkDecimatePro::GetPreSplitMesh ( )
virtual

In some cases you may wish to split the mesh prior to algorithm execution. This separates the mesh into semi-planar patches, which are disconnected from each other. This can give superior results in some cases. If the ivar PreSplitMesh ivar is enabled, the mesh is split with the specified SplitAngle. Otherwise mesh splitting is deferred as long as possible.

virtual void vtkDecimatePro::PreSplitMeshOn ( )
virtual

In some cases you may wish to split the mesh prior to algorithm execution. This separates the mesh into semi-planar patches, which are disconnected from each other. This can give superior results in some cases. If the ivar PreSplitMesh ivar is enabled, the mesh is split with the specified SplitAngle. Otherwise mesh splitting is deferred as long as possible.

virtual void vtkDecimatePro::PreSplitMeshOff ( )
virtual

In some cases you may wish to split the mesh prior to algorithm execution. This separates the mesh into semi-planar patches, which are disconnected from each other. This can give superior results in some cases. If the ivar PreSplitMesh ivar is enabled, the mesh is split with the specified SplitAngle. Otherwise mesh splitting is deferred as long as possible.

virtual void vtkDecimatePro::SetMaximumError ( double  )
virtual

Set the largest decimation error that is allowed during the decimation process. This may limit the maximum reduction that may be achieved. The maximum error is specified as a fraction of the maximum length of the input data bounding box.

virtual double vtkDecimatePro::GetMaximumError ( )
virtual

Set the largest decimation error that is allowed during the decimation process. This may limit the maximum reduction that may be achieved. The maximum error is specified as a fraction of the maximum length of the input data bounding box.

virtual void vtkDecimatePro::SetAccumulateError ( int  )
virtual

The computed error can either be computed directly from the mesh or the error may be accumulated as the mesh is modified. If the error is accumulated, then it represents a global error bounds, and the ivar MaximumError becomes a global bounds on mesh error. Accumulating the error requires extra memory proportional to the number of vertices in the mesh. If AccumulateError is off, then the error is not accumulated.

virtual int vtkDecimatePro::GetAccumulateError ( )
virtual

The computed error can either be computed directly from the mesh or the error may be accumulated as the mesh is modified. If the error is accumulated, then it represents a global error bounds, and the ivar MaximumError becomes a global bounds on mesh error. Accumulating the error requires extra memory proportional to the number of vertices in the mesh. If AccumulateError is off, then the error is not accumulated.

virtual void vtkDecimatePro::AccumulateErrorOn ( )
virtual

The computed error can either be computed directly from the mesh or the error may be accumulated as the mesh is modified. If the error is accumulated, then it represents a global error bounds, and the ivar MaximumError becomes a global bounds on mesh error. Accumulating the error requires extra memory proportional to the number of vertices in the mesh. If AccumulateError is off, then the error is not accumulated.

virtual void vtkDecimatePro::AccumulateErrorOff ( )
virtual

The computed error can either be computed directly from the mesh or the error may be accumulated as the mesh is modified. If the error is accumulated, then it represents a global error bounds, and the ivar MaximumError becomes a global bounds on mesh error. Accumulating the error requires extra memory proportional to the number of vertices in the mesh. If AccumulateError is off, then the error is not accumulated.

virtual void vtkDecimatePro::SetErrorIsAbsolute ( int  )
virtual

The MaximumError is normally defined as a fraction of the dataset bounding diagonal. By setting ErrorIsAbsolute to 1, the error is instead defined as that specified by AbsoluteError. By default ErrorIsAbsolute=0.

virtual int vtkDecimatePro::GetErrorIsAbsolute ( )
virtual

The MaximumError is normally defined as a fraction of the dataset bounding diagonal. By setting ErrorIsAbsolute to 1, the error is instead defined as that specified by AbsoluteError. By default ErrorIsAbsolute=0.

virtual void vtkDecimatePro::SetAbsoluteError ( double  )
virtual

Same as MaximumError, but to be used when ErrorIsAbsolute is 1

virtual double vtkDecimatePro::GetAbsoluteError ( )
virtual

Same as MaximumError, but to be used when ErrorIsAbsolute is 1

virtual void vtkDecimatePro::SetBoundaryVertexDeletion ( int  )
virtual

Turn on/off the deletion of vertices on the boundary of a mesh. This may limit the maximum reduction that may be achieved.

virtual int vtkDecimatePro::GetBoundaryVertexDeletion ( )
virtual

Turn on/off the deletion of vertices on the boundary of a mesh. This may limit the maximum reduction that may be achieved.

virtual void vtkDecimatePro::BoundaryVertexDeletionOn ( )
virtual

Turn on/off the deletion of vertices on the boundary of a mesh. This may limit the maximum reduction that may be achieved.

virtual void vtkDecimatePro::BoundaryVertexDeletionOff ( )
virtual

Turn on/off the deletion of vertices on the boundary of a mesh. This may limit the maximum reduction that may be achieved.

virtual void vtkDecimatePro::SetDegree ( int  )
virtual

If the number of triangles connected to a vertex exceeds "Degree", then the vertex will be split. (NOTE: the complexity of the triangulation algorithm is proportional to Degree^2. Setting degree small can improve the performance of the algorithm.)

virtual int vtkDecimatePro::GetDegree ( )
virtual

If the number of triangles connected to a vertex exceeds "Degree", then the vertex will be split. (NOTE: the complexity of the triangulation algorithm is proportional to Degree^2. Setting degree small can improve the performance of the algorithm.)

virtual void vtkDecimatePro::SetInflectionPointRatio ( double  )
virtual

Specify the inflection point ratio. An inflection point occurs when the ratio of reduction error between two iterations is greater than or equal to the InflectionPointRatio.

virtual double vtkDecimatePro::GetInflectionPointRatio ( )
virtual

Specify the inflection point ratio. An inflection point occurs when the ratio of reduction error between two iterations is greater than or equal to the InflectionPointRatio.

vtkIdType vtkDecimatePro::GetNumberOfInflectionPoints ( )

Get the number of inflection points. Only returns a valid value after the filter has executed. The values in the list are mesh reduction values at each inflection point. Note: the first inflection point always occurs right before non-planar triangles are decimated (i.e., as the error becomes non-zero).

void vtkDecimatePro::GetInflectionPoints ( double inflectionPoints)

Get a list of inflection points. These are double values 0 < r <= 1.0 corresponding to reduction level, and there are a total of NumberOfInflectionPoints() values. You must provide an array (of the correct size) into which the inflection points are written.

double* vtkDecimatePro::GetInflectionPoints ( )

Get a list of inflection points. These are double values 0 < r <= 1.0 corresponding to reduction level, and there are a total of NumberOfInflectionPoints() values. You must provide an array (of the correct size) into which the inflection points are written. This method returns a pointer to a list of inflection points.

virtual void vtkDecimatePro::SetOutputPointsPrecision ( int  )
virtual

Set/get the desired precision for the output types. See the documentation for the vtkAlgorithm::DesiredOutputPrecision enum for an explanation of the available precision settings.

virtual int vtkDecimatePro::GetOutputPointsPrecision ( )
virtual

Set/get the desired precision for the output types. See the documentation for the vtkAlgorithm::DesiredOutputPrecision enum for an explanation of the available precision settings.

int vtkDecimatePro::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
)
protectedvirtual

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

Reimplemented from vtkPolyDataAlgorithm.

void vtkDecimatePro::SplitMesh ( )
protected
int vtkDecimatePro::EvaluateVertex ( vtkIdType  ptId,
unsigned short int  numTris,
vtkIdType tris,
vtkIdType  fedges[2] 
)
protected
vtkIdType vtkDecimatePro::FindSplit ( int  type,
vtkIdType  fedges[2],
vtkIdType pt1,
vtkIdType pt2,
vtkIdList CollapseTris 
)
protected
int vtkDecimatePro::IsValidSplit ( int  index)
protected
void vtkDecimatePro::SplitLoop ( vtkIdType  fedges[2],
vtkIdType n1,
vtkIdType l1,
vtkIdType n2,
vtkIdType l2 
)
protected
void vtkDecimatePro::SplitVertex ( vtkIdType  ptId,
int  type,
unsigned short int  numTris,
vtkIdType tris,
int  insert 
)
protected
int vtkDecimatePro::CollapseEdge ( int  type,
vtkIdType  ptId,
vtkIdType  collapseId,
vtkIdType  pt1,
vtkIdType  pt2,
vtkIdList CollapseTris 
)
protected
void vtkDecimatePro::DistributeError ( double  error)
protected

Friends And Related Function Documentation

friend class VertexArray
friend

Definition at line 326 of file vtkDecimatePro.h.

friend class TriArray
friend

Definition at line 346 of file vtkDecimatePro.h.

Member Data Documentation

double vtkDecimatePro::TargetReduction
protected

Definition at line 267 of file vtkDecimatePro.h.

double vtkDecimatePro::FeatureAngle
protected

Definition at line 268 of file vtkDecimatePro.h.

double vtkDecimatePro::MaximumError
protected

Definition at line 269 of file vtkDecimatePro.h.

double vtkDecimatePro::AbsoluteError
protected

Definition at line 270 of file vtkDecimatePro.h.

int vtkDecimatePro::ErrorIsAbsolute
protected

Definition at line 271 of file vtkDecimatePro.h.

int vtkDecimatePro::AccumulateError
protected

Definition at line 272 of file vtkDecimatePro.h.

double vtkDecimatePro::SplitAngle
protected

Definition at line 273 of file vtkDecimatePro.h.

int vtkDecimatePro::Splitting
protected

Definition at line 274 of file vtkDecimatePro.h.

int vtkDecimatePro::PreSplitMesh
protected

Definition at line 275 of file vtkDecimatePro.h.

int vtkDecimatePro::BoundaryVertexDeletion
protected

Definition at line 276 of file vtkDecimatePro.h.

int vtkDecimatePro::PreserveTopology
protected

Definition at line 277 of file vtkDecimatePro.h.

int vtkDecimatePro::Degree
protected

Definition at line 278 of file vtkDecimatePro.h.

double vtkDecimatePro::InflectionPointRatio
protected

Definition at line 279 of file vtkDecimatePro.h.

vtkDoubleArray* vtkDecimatePro::InflectionPoints
protected

Definition at line 280 of file vtkDecimatePro.h.

int vtkDecimatePro::OutputPointsPrecision
protected

Definition at line 281 of file vtkDecimatePro.h.

vtkIdList* vtkDecimatePro::Neighbors
protected

Definition at line 284 of file vtkDecimatePro.h.

vtkPriorityQueue* vtkDecimatePro::EdgeLengths
protected

Definition at line 285 of file vtkDecimatePro.h.


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