VTK  9.0.1
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 =========================================================================*/
69 #ifndef vtkCleanPolyData_h
70 #define vtkCleanPolyData_h
71 
72 #include "vtkFiltersCoreModule.h" // For export macro
73 #include "vtkPolyDataAlgorithm.h"
74 
76 
77 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
78 {
79 public:
80  static vtkCleanPolyData* New();
81  void PrintSelf(ostream& os, vtkIndent indent) override;
83 
85 
90  vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
91  vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
92  vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
94 
96 
100  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
101  vtkGetMacro(Tolerance, double);
103 
105 
108  vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
109  vtkGetMacro(AbsoluteTolerance, double);
111 
113 
116  vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
117  vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
118  vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
120 
122 
125  vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
126  vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
127  vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
129 
131 
134  vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
135  vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
136  vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
138 
140 
146  vtkSetMacro(PointMerging, vtkTypeBool);
147  vtkGetMacro(PointMerging, vtkTypeBool);
148  vtkBooleanMacro(PointMerging, vtkTypeBool);
150 
152 
156  virtual void SetLocator(vtkIncrementalPointLocator* locator);
157  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
159 
163  void CreateDefaultLocator(vtkPolyData* input = nullptr);
164 
168  void ReleaseLocator() { this->SetLocator(nullptr); }
169 
173  vtkMTimeType GetMTime() override;
174 
178  virtual void OperateOnPoint(double in[3], double out[3]);
179 
183  virtual void OperateOnBounds(double in[6], double out[6]);
184 
185  // This filter is difficult to stream.
186  // To get invariant results, the whole input must be processed at once.
187  // This flag allows the user to select whether strict piece invariance
188  // is required. By default it is on. When off, the filter can stream,
189  // but results may change.
190  vtkSetMacro(PieceInvariant, vtkTypeBool);
191  vtkGetMacro(PieceInvariant, vtkTypeBool);
192  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
193 
195 
200  vtkSetMacro(OutputPointsPrecision, int);
201  vtkGetMacro(OutputPointsPrecision, int);
203 
204 protected:
206  ~vtkCleanPolyData() override;
207 
208  // Usual data generation method
211 
213  double Tolerance;
220 
223 
224 private:
225  vtkCleanPolyData(const vtkCleanPolyData&) = delete;
226  void operator=(const vtkCleanPolyData&) = delete;
227 };
228 
229 #endif
merge duplicate points, and/or remove unused points and/or remove degenerate cells
virtual void OperateOnPoint(double in[3], double out[3])
Perform operation on a point.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCleanPolyData * New()
void ReleaseLocator()
Release locator.
virtual void OperateOnBounds(double in[6], double out[6])
Perform operation on bounds.
vtkTypeBool PointMerging
vtkTypeBool ConvertPolysToLines
vtkMTimeType GetMTime() override
Get the MTime of this object also considering the locator.
vtkTypeBool ConvertLinesToPoints
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkCleanPolyData() override
void CreateDefaultLocator(vtkPolyData *input=nullptr)
Create default locator.
virtual void SetLocator(vtkIncrementalPointLocator *locator)
Set/Get a spatial locator for speeding the search process.
vtkIncrementalPointLocator * Locator
vtkTypeBool ConvertStripsToPolys
vtkTypeBool ToleranceIsAbsolute
vtkTypeBool PieceInvariant
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165