VTK
Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkDecimatePolylineFilter Class Reference

reduce the number of lines in a polyline More...

#include <vtkDecimatePolylineFilter.h>

Inheritance diagram for vtkDecimatePolylineFilter:
Inheritance graph
[legend]
Collaboration diagram for vtkDecimatePolylineFilter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void SetTargetReduction (double)
virtual double GetTargetReduction ()

Static Public Member Functions

static vtkDecimatePolylineFilterNew ()

Protected Member Functions

 vtkDecimatePolylineFilter ()
 ~vtkDecimatePolylineFilter ()
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
double ComputeError (vtkPolyData *input, int prev, int id, int next)
void UpdateError (vtkPolyData *input, int iId)
int GetPrev (int iId)
int GetNext (int iId)

Protected Attributes

vtkDecimatePolylineVertexErrorSTLMap * ErrorMap
vtkSmartPointer< vtkPriorityQueuePriorityQueue
bool Closed
double TargetReduction
typedef vtkPolyDataAlgorithm Superclass
static int IsTypeOf (const char *type)
static vtkDecimatePolylineFilterSafeDownCast (vtkObjectBase *o)
virtual int IsA (const char *type)
vtkDecimatePolylineFilterNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkObjectBaseNewInstanceInternal () const

Detailed Description

reduce the number of lines in a polyline

vtkDecimatePolylineFilter is a filter to reduce the number of lines in a polyline. The algorithm functions by evaluating an error metric for each vertex (i.e., the distance of the vertex to a line defined from the two vertices on either side of the vertex). Then, these vertices are placed into a priority queue, and those with larger errors are deleted first. The decimation continues until the target reduction is reached.

Warning:
This algorithm is a very simple implementation that overlooks some potential complexities. First, if a vertex is multiply connected, meaning that it is used by multiple polylines, then the extra topological constraints are ignored. Second, the error is not updated as vertices are deleted (similar to iteratively computing a quadric error metric). Thus, once calculated, the error is used to determine which vertices are removed. This can produce less than optimal results.
See also:
vtkDecimate vtkDecimateProp vtkQuadricClustering vtkQuadricDecimation
Tests:
vtkDecimatePolylineFilter (Tests)

Definition at line 52 of file vtkDecimatePolylineFilter.h.


Member Typedef Documentation

Standard methods for type information and printing.

Reimplemented from vtkPolyDataAlgorithm.

Definition at line 57 of file vtkDecimatePolylineFilter.h.


Constructor & Destructor Documentation


Member Function Documentation

static int vtkDecimatePolylineFilter::IsTypeOf ( const char *  type) [static]

Standard methods for type information and printing.

Reimplemented from vtkPolyDataAlgorithm.

virtual int vtkDecimatePolylineFilter::IsA ( const char *  type) [virtual]

Standard methods for type information and printing.

Reimplemented from vtkPolyDataAlgorithm.

Standard methods for type information and printing.

Reimplemented from vtkPolyDataAlgorithm.

virtual vtkObjectBase* vtkDecimatePolylineFilter::NewInstanceInternal ( ) const [protected, virtual]

Standard methods for type information and printing.

Reimplemented from vtkPolyDataAlgorithm.

Standard methods for type information and printing.

Reimplemented from vtkPolyDataAlgorithm.

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

Standard methods for type information and printing.

Reimplemented from vtkPolyDataAlgorithm.

Instantiate this object with a target reduction of 0.90.

Reimplemented from vtkPolyDataAlgorithm.

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).

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).

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

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

Reimplemented from vtkPolyDataAlgorithm.

double vtkDecimatePolylineFilter::ComputeError ( vtkPolyData input,
int  prev,
int  id,
int  next 
) [protected]
void vtkDecimatePolylineFilter::UpdateError ( vtkPolyData input,
int  iId 
) [protected]

Member Data Documentation

vtkDecimatePolylineVertexErrorSTLMap* vtkDecimatePolylineFilter::ErrorMap [protected]

Definition at line 84 of file vtkDecimatePolylineFilter.h.

Definition at line 87 of file vtkDecimatePolylineFilter.h.

Definition at line 88 of file vtkDecimatePolylineFilter.h.

Definition at line 89 of file vtkDecimatePolylineFilter.h.


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