VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Core/vtkCleanPolyData.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCleanPolyData.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 =========================================================================*/
00070 #ifndef vtkCleanPolyData_h
00071 #define vtkCleanPolyData_h
00072 
00073 #include "vtkFiltersCoreModule.h" // For export macro
00074 #include "vtkPolyDataAlgorithm.h"
00075 
00076 class vtkIncrementalPointLocator;
00077 
00078 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
00079 {
00080 public:
00081   static vtkCleanPolyData *New();
00082   void PrintSelf(ostream& os, vtkIndent indent);
00083   vtkTypeMacro(vtkCleanPolyData,vtkPolyDataAlgorithm);
00084 
00086 
00089   vtkSetMacro(ToleranceIsAbsolute,int);
00090   vtkBooleanMacro(ToleranceIsAbsolute,int);
00091   vtkGetMacro(ToleranceIsAbsolute,int);
00093 
00095 
00097   vtkSetClampMacro(Tolerance,double,0.0,1.0);
00098   vtkGetMacro(Tolerance,double);
00100 
00102 
00103   vtkSetClampMacro(AbsoluteTolerance,double,0.0,VTK_DOUBLE_MAX);
00104   vtkGetMacro(AbsoluteTolerance,double);
00106 
00108 
00109   vtkSetMacro(ConvertLinesToPoints,int);
00110   vtkBooleanMacro(ConvertLinesToPoints,int);
00111   vtkGetMacro(ConvertLinesToPoints,int);
00113 
00115 
00116   vtkSetMacro(ConvertPolysToLines,int);
00117   vtkBooleanMacro(ConvertPolysToLines,int);
00118   vtkGetMacro(ConvertPolysToLines,int);
00120 
00122 
00123   vtkSetMacro(ConvertStripsToPolys,int);
00124   vtkBooleanMacro(ConvertStripsToPolys,int);
00125   vtkGetMacro(ConvertStripsToPolys,int);
00127 
00129 
00133   vtkSetMacro(PointMerging,int);
00134   vtkGetMacro(PointMerging,int);
00135   vtkBooleanMacro(PointMerging,int);
00137 
00139 
00141   virtual void SetLocator(vtkIncrementalPointLocator *locator);
00142   vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
00144 
00146   void CreateDefaultLocator(vtkPolyData *input = 0);
00147 
00149   void ReleaseLocator() { this->SetLocator(NULL); }
00150 
00152   unsigned long int GetMTime();
00153 
00155   virtual void OperateOnPoint(double in[3], double out[3]);
00156 
00158   virtual void OperateOnBounds(double in[6], double out[6]);
00159 
00160   // This filter is difficult to stream.
00161   // To get invariant results, the whole input must be processed at once.
00162   // This flag allows the user to select whether strict piece invariance
00163   // is required.  By default it is on.  When off, the filter can stream,
00164   // but results may change.
00165   vtkSetMacro(PieceInvariant, int);
00166   vtkGetMacro(PieceInvariant, int);
00167   vtkBooleanMacro(PieceInvariant, int);
00168 
00170 
00173   vtkSetMacro(OutputPointsPrecision,int);
00174   vtkGetMacro(OutputPointsPrecision,int);
00176 
00177 protected:
00178   vtkCleanPolyData();
00179  ~vtkCleanPolyData();
00180 
00181   // Usual data generation method
00182   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00183   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00184 
00185   int   PointMerging;
00186   double Tolerance;
00187   double AbsoluteTolerance;
00188   int ConvertLinesToPoints;
00189   int ConvertPolysToLines;
00190   int ConvertStripsToPolys;
00191   int ToleranceIsAbsolute;
00192   vtkIncrementalPointLocator *Locator;
00193 
00194   int PieceInvariant;
00195   int OutputPointsPrecision;
00196 private:
00197   vtkCleanPolyData(const vtkCleanPolyData&);  // Not implemented.
00198   void operator=(const vtkCleanPolyData&);  // Not implemented.
00199 };
00200 
00201 #endif