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
vtkCleanPolyData::Tolerance
double Tolerance
Definition: vtkCleanPolyData.h:219
vtkCleanPolyData::PointMerging
vtkTypeBool PointMerging
Definition: vtkCleanPolyData.h:218
vtkCleanPolyData::AbsoluteTolerance
double AbsoluteTolerance
Definition: vtkCleanPolyData.h:220
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkCleanPolyData
merge duplicate points, and/or remove unused points and/or remove degenerate cells
Definition: vtkCleanPolyData.h:83
vtkPolyDataAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkCleanPolyData::ReleaseLocator
void ReleaseLocator()
Release locator.
Definition: vtkCleanPolyData.h:174
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:221
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:225
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkCleanPolyData::ToleranceIsAbsolute
vtkTypeBool ToleranceIsAbsolute
Definition: vtkCleanPolyData.h:224
vtkCleanPolyData::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkCleanPolyData.h:228
vtkCleanPolyData::ConvertPolysToLines
vtkTypeBool ConvertPolysToLines
Definition: vtkCleanPolyData.h:222
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkCleanPolyData::ConvertStripsToPolys
vtkTypeBool ConvertStripsToPolys
Definition: vtkCleanPolyData.h:223
vtkCleanPolyData::PieceInvariant
vtkTypeBool PieceInvariant
Definition: vtkCleanPolyData.h:227
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
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:44