VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDecimatePolylineFilter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00041 #ifndef __vtkDecimatePolylineFilter_h 00042 #define __vtkDecimatePolylineFilter_h 00043 00044 #include "vtkFiltersCoreModule.h" // For export macro 00045 #include "vtkSmartPointer.h" // Needed for SP ivars 00046 00047 #include "vtkPolyDataAlgorithm.h" 00048 00049 class vtkPriorityQueue; 00050 00051 00052 class VTKFILTERSCORE_EXPORT vtkDecimatePolylineFilter : public vtkPolyDataAlgorithm 00053 { 00054 public: 00056 00057 vtkTypeMacro(vtkDecimatePolylineFilter,vtkPolyDataAlgorithm); 00058 void PrintSelf(ostream& os, vtkIndent indent); 00060 00062 static vtkDecimatePolylineFilter *New(); 00063 00065 00068 vtkSetClampMacro(TargetReduction,double,0.0,1.0); 00069 vtkGetMacro(TargetReduction,double); 00071 00073 00076 vtkSetMacro(OutputPointsPrecision,int); 00077 vtkGetMacro(OutputPointsPrecision,int); 00079 00080 protected: 00081 vtkDecimatePolylineFilter(); 00082 ~vtkDecimatePolylineFilter(); 00083 00084 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00085 00086 double ComputeError( vtkPolyData* input, int prev, int id, int next ); 00087 void UpdateError( vtkPolyData* input, int iId ); 00088 00089 int GetPrev( int iId ); 00090 int GetNext( int iId ); 00091 00092 struct vtkDecimatePolylineVertexErrorSTLMap; 00093 vtkDecimatePolylineVertexErrorSTLMap* ErrorMap; 00094 00095 vtkSmartPointer< vtkPriorityQueue > PriorityQueue; 00096 bool Closed; 00097 double TargetReduction; 00098 int OutputPointsPrecision; 00099 00100 private: 00101 vtkDecimatePolylineFilter(const vtkDecimatePolylineFilter&); // Not implemented. 00102 void operator=(const vtkDecimatePolylineFilter&); // Not implemented. 00103 }; 00104 00105 #endif 00106 00107