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 =========================================================================*/
65 #ifndef vtkCleanPolyData_h
66 #define vtkCleanPolyData_h
67 
68 #include "vtkFiltersCoreModule.h" // For export macro
69 #include "vtkPolyDataAlgorithm.h"
70 
72 
73 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
74 {
75 public:
76  static vtkCleanPolyData *New();
77  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
81 
86  vtkSetMacro(ToleranceIsAbsolute,vtkTypeBool);
87  vtkBooleanMacro(ToleranceIsAbsolute,vtkTypeBool);
88  vtkGetMacro(ToleranceIsAbsolute,vtkTypeBool);
90 
92 
96  vtkSetClampMacro(Tolerance,double,0.0,1.0);
97  vtkGetMacro(Tolerance,double);
99 
101 
104  vtkSetClampMacro(AbsoluteTolerance,double,0.0,VTK_DOUBLE_MAX);
105  vtkGetMacro(AbsoluteTolerance,double);
107 
109 
112  vtkSetMacro(ConvertLinesToPoints,vtkTypeBool);
113  vtkBooleanMacro(ConvertLinesToPoints,vtkTypeBool);
114  vtkGetMacro(ConvertLinesToPoints,vtkTypeBool);
116 
118 
121  vtkSetMacro(ConvertPolysToLines,vtkTypeBool);
122  vtkBooleanMacro(ConvertPolysToLines,vtkTypeBool);
123  vtkGetMacro(ConvertPolysToLines,vtkTypeBool);
125 
127 
130  vtkSetMacro(ConvertStripsToPolys,vtkTypeBool);
131  vtkBooleanMacro(ConvertStripsToPolys,vtkTypeBool);
132  vtkGetMacro(ConvertStripsToPolys,vtkTypeBool);
134 
136 
142  vtkSetMacro(PointMerging,vtkTypeBool);
143  vtkGetMacro(PointMerging,vtkTypeBool);
144  vtkBooleanMacro(PointMerging,vtkTypeBool);
146 
148 
152  virtual void SetLocator(vtkIncrementalPointLocator *locator);
153  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
155 
159  void CreateDefaultLocator(vtkPolyData *input = nullptr);
160 
164  void ReleaseLocator() { this->SetLocator(nullptr); }
165 
169  vtkMTimeType GetMTime() override;
170 
174  virtual void OperateOnPoint(double in[3], double out[3]);
175 
179  virtual void OperateOnBounds(double in[6], double out[6]);
180 
181  // This filter is difficult to stream.
182  // To get invariant results, the whole input must be processed at once.
183  // This flag allows the user to select whether strict piece invariance
184  // is required. By default it is on. When off, the filter can stream,
185  // but results may change.
186  vtkSetMacro(PieceInvariant, vtkTypeBool);
187  vtkGetMacro(PieceInvariant, vtkTypeBool);
188  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
189 
191 
196  vtkSetMacro(OutputPointsPrecision,int);
197  vtkGetMacro(OutputPointsPrecision,int);
199 
200 protected:
202  ~vtkCleanPolyData() override;
203 
204  // Usual data generation method
207 
209  double Tolerance;
216 
219 private:
220  vtkCleanPolyData(const vtkCleanPolyData&) = delete;
221  void operator=(const vtkCleanPolyData&) = delete;
222 };
223 
224 #endif
vtkTypeBool ConvertLinesToPoints
#define VTK_DOUBLE_MAX
Definition: vtkType.h:167
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
vtkTypeBool ToleranceIsAbsolute
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTypeBool ConvertPolysToLines
vtkTypeBool ConvertStripsToPolys
Abstract class in support of both point location and point insertion.
vtkTypeBool PieceInvariant
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
merge duplicate points, and/or remove unused points and/or remove degenerate cells ...
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkTypeBool PointMerging
void ReleaseLocator()
Release locator.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIncrementalPointLocator * Locator