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 00072 protected: 00073 vtkDecimatePolylineFilter(); 00074 ~vtkDecimatePolylineFilter(); 00075 00076 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00077 00078 double ComputeError( vtkPolyData* input, int prev, int id, int next ); 00079 void UpdateError( vtkPolyData* input, int iId ); 00080 00081 int GetPrev( int iId ); 00082 int GetNext( int iId ); 00083 00084 struct vtkDecimatePolylineVertexErrorSTLMap; 00085 vtkDecimatePolylineVertexErrorSTLMap* ErrorMap; 00086 00087 vtkSmartPointer< vtkPriorityQueue > PriorityQueue; 00088 bool Closed; 00089 double TargetReduction; 00090 00091 private: 00092 vtkDecimatePolylineFilter(const vtkDecimatePolylineFilter&); // Not implemented. 00093 void operator=(const vtkDecimatePolylineFilter&); // Not implemented. 00094 }; 00095 00096 #endif 00097 00098