VTK
vtkCleanPolyData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCleanPolyData.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
71 #ifndef vtkCleanPolyData_h
72 #define vtkCleanPolyData_h
73 
74 #include "vtkFiltersCoreModule.h" // For export macro
75 #include "vtkPolyDataAlgorithm.h"
76 
78 
79 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
80 {
81 public:
82  static vtkCleanPolyData *New();
83  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
85 
87 
92  vtkSetMacro(ToleranceIsAbsolute,int);
93  vtkBooleanMacro(ToleranceIsAbsolute,int);
94  vtkGetMacro(ToleranceIsAbsolute,int);
96 
98 
102  vtkSetClampMacro(Tolerance,double,0.0,1.0);
103  vtkGetMacro(Tolerance,double);
105 
107 
110  vtkSetClampMacro(AbsoluteTolerance,double,0.0,VTK_DOUBLE_MAX);
111  vtkGetMacro(AbsoluteTolerance,double);
113 
115 
118  vtkSetMacro(ConvertLinesToPoints,int);
119  vtkBooleanMacro(ConvertLinesToPoints,int);
120  vtkGetMacro(ConvertLinesToPoints,int);
122 
124 
127  vtkSetMacro(ConvertPolysToLines,int);
128  vtkBooleanMacro(ConvertPolysToLines,int);
129  vtkGetMacro(ConvertPolysToLines,int);
131 
133 
136  vtkSetMacro(ConvertStripsToPolys,int);
137  vtkBooleanMacro(ConvertStripsToPolys,int);
138  vtkGetMacro(ConvertStripsToPolys,int);
140 
142 
148  vtkSetMacro(PointMerging,int);
149  vtkGetMacro(PointMerging,int);
150  vtkBooleanMacro(PointMerging,int);
152 
154 
158  virtual void SetLocator(vtkIncrementalPointLocator *locator);
159  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
161 
165  void CreateDefaultLocator(vtkPolyData *input = 0);
166 
170  void ReleaseLocator() { this->SetLocator(NULL); }
171 
175  vtkMTimeType GetMTime() VTK_OVERRIDE;
176 
180  virtual void OperateOnPoint(double in[3], double out[3]);
181 
185  virtual void OperateOnBounds(double in[6], double out[6]);
186 
187  // This filter is difficult to stream.
188  // To get invariant results, the whole input must be processed at once.
189  // This flag allows the user to select whether strict piece invariance
190  // is required. By default it is on. When off, the filter can stream,
191  // but results may change.
192  vtkSetMacro(PieceInvariant, int);
193  vtkGetMacro(PieceInvariant, int);
194  vtkBooleanMacro(PieceInvariant, int);
195 
197 
202  vtkSetMacro(OutputPointsPrecision,int);
203  vtkGetMacro(OutputPointsPrecision,int);
205 
206 protected:
208  ~vtkCleanPolyData() VTK_OVERRIDE;
209 
210  // Usual data generation method
211  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
212  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
213 
214  int PointMerging;
215  double Tolerance;
216  double AbsoluteTolerance;
217  int ConvertLinesToPoints;
218  int ConvertPolysToLines;
219  int ConvertStripsToPolys;
220  int ToleranceIsAbsolute;
222 
223  int PieceInvariant;
224  int OutputPointsPrecision;
225 private:
226  vtkCleanPolyData(const vtkCleanPolyData&) VTK_DELETE_FUNCTION;
227  void operator=(const vtkCleanPolyData&) VTK_DELETE_FUNCTION;
228 };
229 
230 #endif
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkCleanPolyData
merge duplicate points, and/or remove unused points and/or remove degenerate cells
Definition: vtkCleanPolyData.h:79
vtkCleanPolyData::ReleaseLocator
void ReleaseLocator()
Release locator.
Definition: vtkCleanPolyData.h:170
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkPolyDataAlgorithm.h
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44