Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkCleanPolyData.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCleanPolyData.h,v $
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 =========================================================================*/
00074 #ifndef __vtkCleanPolyData_h
00075 #define __vtkCleanPolyData_h
00076 
00077 #include "vtkPolyDataToPolyDataFilter.h"
00078 
00079 class vtkPointLocator;
00080 
00081 class VTK_GRAPHICS_EXPORT vtkCleanPolyData : public vtkPolyDataToPolyDataFilter
00082 {
00083 public:
00084   static vtkCleanPolyData *New();
00085   void PrintSelf(ostream& os, vtkIndent indent);
00086   vtkTypeRevisionMacro(vtkCleanPolyData,vtkPolyDataToPolyDataFilter);
00087 
00089 
00092   vtkSetMacro(ToleranceIsAbsolute,int);
00093   vtkBooleanMacro(ToleranceIsAbsolute,int);
00094   vtkGetMacro(ToleranceIsAbsolute,int);
00096 
00098 
00099   vtkSetClampMacro(Tolerance,double,0.0,1.0);
00100   vtkGetMacro(Tolerance,double);
00102 
00104 
00105   vtkSetClampMacro(AbsoluteTolerance,double,0.0,VTK_DOUBLE_MAX);
00106   vtkGetMacro(AbsoluteTolerance,double);
00108 
00110 
00111   vtkSetMacro(ConvertLinesToPoints,int);
00112   vtkBooleanMacro(ConvertLinesToPoints,int);
00113   vtkGetMacro(ConvertLinesToPoints,int);
00115 
00117 
00118   vtkSetMacro(ConvertPolysToLines,int);
00119   vtkBooleanMacro(ConvertPolysToLines,int);
00120   vtkGetMacro(ConvertPolysToLines,int);
00122 
00124 
00125   vtkSetMacro(ConvertStripsToPolys,int);
00126   vtkBooleanMacro(ConvertStripsToPolys,int);
00127   vtkGetMacro(ConvertStripsToPolys,int);
00129 
00131 
00135   vtkSetMacro(PointMerging,int);
00136   vtkGetMacro(PointMerging,int);
00137   vtkBooleanMacro(PointMerging,int);
00139 
00141 
00143   void SetLocator(vtkPointLocator *locator);
00144   vtkGetObjectMacro(Locator,vtkPointLocator);
00146 
00148   void CreateDefaultLocator(void);
00149 
00151   void ReleaseLocator(void);
00152 
00154   unsigned long int GetMTime();
00155 
00157   virtual void OperateOnPoint(double in[3], double out[3]);
00158 
00160   virtual void OperateOnBounds(double in[6], double out[6]);
00161 
00162   // This filter is difficult to stream.
00163   // To get invariant results, the whole input must be processed at once.
00164   // This flag allows the user to select whether strict piece invariance
00165   // is required.  By default it is on.  When off, the filter can stream,
00166   // but results may change.
00167   vtkSetMacro(PieceInvariant, int);
00168   vtkGetMacro(PieceInvariant, int);
00169   vtkBooleanMacro(PieceInvariant, int);
00170 
00171 protected:
00172   vtkCleanPolyData();
00173  ~vtkCleanPolyData();
00174 
00175   // Usual data generation method
00176   void Execute();
00177   void ExecuteInformation();
00178   virtual void ComputeInputUpdateExtents(vtkDataObject *output);
00179 
00180   int   PointMerging;
00181   double Tolerance;
00182   double AbsoluteTolerance;
00183   int ConvertLinesToPoints;
00184   int ConvertPolysToLines;
00185   int ConvertStripsToPolys;
00186   int ToleranceIsAbsolute;
00187   vtkPointLocator *Locator;
00188 
00189   int PieceInvariant;
00190 private:
00191   vtkCleanPolyData(const vtkCleanPolyData&);  // Not implemented.
00192   void operator=(const vtkCleanPolyData&);  // Not implemented.
00193 };
00194 
00195 #endif
00196 
00197