VTK
dox/Graphics/vtkDecimatePolylineFilter.h
Go to the documentation of this file.
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 "vtkSmartPointer.h" // Needed for SP ivars
00045 
00046 #include "vtkPolyDataAlgorithm.h"
00047 
00048 class vtkPriorityQueue;
00049 
00050 
00051 class VTK_GRAPHICS_EXPORT vtkDecimatePolylineFilter : public vtkPolyDataAlgorithm
00052 {
00053 public:
00055 
00056   vtkTypeMacro(vtkDecimatePolylineFilter,vtkPolyDataAlgorithm);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061   static vtkDecimatePolylineFilter *New();
00062 
00064 
00067   vtkSetClampMacro(TargetReduction,double,0.0,1.0);
00068   vtkGetMacro(TargetReduction,double);
00070 
00071 protected:
00072   vtkDecimatePolylineFilter();
00073   ~vtkDecimatePolylineFilter();
00074 
00075   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00076 
00077   double ComputeError( vtkPolyData* input, int prev, int id, int next );
00078   void UpdateError( vtkPolyData* input, int iId );
00079 
00080   int GetPrev( int iId );
00081   int GetNext( int iId );
00082 
00083   struct    vtkDecimatePolylineVertexErrorSTLMap;
00084   vtkDecimatePolylineVertexErrorSTLMap*  ErrorMap;
00085 
00086   vtkSmartPointer< vtkPriorityQueue >   PriorityQueue;
00087   bool                                  Closed;
00088   double                                TargetReduction;
00089 
00090 private:
00091   vtkDecimatePolylineFilter(const vtkDecimatePolylineFilter&);  // Not implemented.
00092   void operator=(const vtkDecimatePolylineFilter&);  // Not implemented.
00093 };
00094 
00095 #endif
00096 
00097