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
vtkCleanPolyData::Tolerance
double Tolerance
Definition: vtkCleanPolyData.h:209
vtkCleanPolyData::PointMerging
vtkTypeBool PointMerging
Definition: vtkCleanPolyData.h:208
vtkCleanPolyData::AbsoluteTolerance
double AbsoluteTolerance
Definition: vtkCleanPolyData.h:210
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:73
vtkPolyDataAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkCleanPolyData::ReleaseLocator
void ReleaseLocator()
Release locator.
Definition: vtkCleanPolyData.h:164
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:211
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:215
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:214
vtkCleanPolyData::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkCleanPolyData.h:218
vtkCleanPolyData::ConvertPolysToLines
vtkTypeBool ConvertPolysToLines
Definition: vtkCleanPolyData.h:212
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkCleanPolyData::ConvertStripsToPolys
vtkTypeBool ConvertStripsToPolys
Definition: vtkCleanPolyData.h:213
vtkCleanPolyData::PieceInvariant
vtkTypeBool PieceInvariant
Definition: vtkCleanPolyData.h:217
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41