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 =========================================================================*/
75 #ifndef vtkCleanPolyData_h
76 #define vtkCleanPolyData_h
77 
78 #include "vtkFiltersCoreModule.h" // For export macro
79 #include "vtkPolyDataAlgorithm.h"
80 
82 
83 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
84 {
85 public:
86  static vtkCleanPolyData *New();
87  void PrintSelf(ostream& os, vtkIndent indent) override;
89 
91 
96  vtkSetMacro(ToleranceIsAbsolute,vtkTypeBool);
97  vtkBooleanMacro(ToleranceIsAbsolute,vtkTypeBool);
98  vtkGetMacro(ToleranceIsAbsolute,vtkTypeBool);
100 
102 
106  vtkSetClampMacro(Tolerance,double,0.0,1.0);
107  vtkGetMacro(Tolerance,double);
109 
111 
114  vtkSetClampMacro(AbsoluteTolerance,double,0.0,VTK_DOUBLE_MAX);
115  vtkGetMacro(AbsoluteTolerance,double);
117 
119 
122  vtkSetMacro(ConvertLinesToPoints,vtkTypeBool);
123  vtkBooleanMacro(ConvertLinesToPoints,vtkTypeBool);
124  vtkGetMacro(ConvertLinesToPoints,vtkTypeBool);
126 
128 
131  vtkSetMacro(ConvertPolysToLines,vtkTypeBool);
132  vtkBooleanMacro(ConvertPolysToLines,vtkTypeBool);
133  vtkGetMacro(ConvertPolysToLines,vtkTypeBool);
135 
137 
140  vtkSetMacro(ConvertStripsToPolys,vtkTypeBool);
141  vtkBooleanMacro(ConvertStripsToPolys,vtkTypeBool);
142  vtkGetMacro(ConvertStripsToPolys,vtkTypeBool);
144 
146 
152  vtkSetMacro(PointMerging,vtkTypeBool);
153  vtkGetMacro(PointMerging,vtkTypeBool);
154  vtkBooleanMacro(PointMerging,vtkTypeBool);
156 
158 
162  virtual void SetLocator(vtkIncrementalPointLocator *locator);
163  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
165 
169  void CreateDefaultLocator(vtkPolyData *input = nullptr);
170 
174  void ReleaseLocator() { this->SetLocator(nullptr); }
175 
179  vtkMTimeType GetMTime() override;
180 
184  virtual void OperateOnPoint(double in[3], double out[3]);
185 
189  virtual void OperateOnBounds(double in[6], double out[6]);
190 
191  // This filter is difficult to stream.
192  // To get invariant results, the whole input must be processed at once.
193  // This flag allows the user to select whether strict piece invariance
194  // is required. By default it is on. When off, the filter can stream,
195  // but results may change.
196  vtkSetMacro(PieceInvariant, vtkTypeBool);
197  vtkGetMacro(PieceInvariant, vtkTypeBool);
198  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
199 
201 
206  vtkSetMacro(OutputPointsPrecision,int);
207  vtkGetMacro(OutputPointsPrecision,int);
209 
210 protected:
212  ~vtkCleanPolyData() override;
213 
214  // Usual data generation method
217 
219  double Tolerance;
226 
229 private:
230  vtkCleanPolyData(const vtkCleanPolyData&) = delete;
231  void operator=(const vtkCleanPolyData&) = delete;
232 };
233 
234 #endif
vtkTypeBool ConvertLinesToPoints
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
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:85
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:39
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