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
vtkCleanPolyData::Tolerance
double Tolerance
Definition: vtkCleanPolyData.h:213
vtkCleanPolyData::PointMerging
vtkTypeBool PointMerging
Definition: vtkCleanPolyData.h:212
vtkCleanPolyData::AbsoluteTolerance
double AbsoluteTolerance
Definition: vtkCleanPolyData.h:214
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkCleanPolyData
merge duplicate points, and/or remove unused points and/or remove degenerate cells
Definition: vtkCleanPolyData.h:77
vtkPolyDataAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkCleanPolyData::ReleaseLocator
void ReleaseLocator()
Release locator.
Definition: vtkCleanPolyData.h:168
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkCleanPolyData::ConvertLinesToPoints
vtkTypeBool ConvertLinesToPoints
Definition: vtkCleanPolyData.h:215
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkCleanPolyData::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkCleanPolyData.h:219
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkCleanPolyData::ToleranceIsAbsolute
vtkTypeBool ToleranceIsAbsolute
Definition: vtkCleanPolyData.h:218
vtkCleanPolyData::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkCleanPolyData.h:222
vtkCleanPolyData::ConvertPolysToLines
vtkTypeBool ConvertPolysToLines
Definition: vtkCleanPolyData.h:216
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkCleanPolyData::ConvertStripsToPolys
vtkTypeBool ConvertStripsToPolys
Definition: vtkCleanPolyData.h:217
vtkCleanPolyData::PieceInvariant
vtkTypeBool PieceInvariant
Definition: vtkCleanPolyData.h:221
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41