VTK  9.3.0
vtkCleanUnstructuredGrid.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkCleanUnstructuredGrid_h
22 #define vtkCleanUnstructuredGrid_h
23 
24 #include "vtkFiltersGeneralModule.h" // For export macro
25 #include "vtkSmartPointer.h"
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 
31 class vtkDataSet;
32 
33 class VTKFILTERSGENERAL_EXPORT vtkCleanUnstructuredGrid : public vtkUnstructuredGridAlgorithm
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
46  vtkSetMacro(ToleranceIsAbsolute, bool);
47  vtkBooleanMacro(ToleranceIsAbsolute, bool);
48  vtkGetMacro(ToleranceIsAbsolute, bool);
50 
52 
56  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
57  vtkGetMacro(Tolerance, double);
59 
61 
64  vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
65  vtkGetMacro(AbsoluteTolerance, double);
67 
69 
73  virtual void SetLocator(vtkIncrementalPointLocator* locator);
76 
80  void CreateDefaultLocator(vtkDataSet* input = nullptr);
81 
85  void ReleaseLocator() { this->SetLocator(nullptr); }
86 
88 
93  vtkSetMacro(OutputPointsPrecision, int);
94  vtkGetMacro(OutputPointsPrecision, int);
96 
98 
103  vtkSetMacro(RemovePointsWithoutCells, bool);
104  vtkGetMacro(RemovePointsWithoutCells, bool);
105  vtkBooleanMacro(RemovePointsWithoutCells, bool);
107 
109 
119  vtkGetMacro(PointDataWeighingStrategy, int);
120  vtkSetClampMacro(PointDataWeighingStrategy, int, FIRST_POINT, NUMBER_OF_WEIGHING_TYPES - 1);
122 
124  {
125  FIRST_POINT = 0,
128  NUMBER_OF_WEIGHING_TYPES
129  };
130 
131 protected:
134 
135  bool ToleranceIsAbsolute = false;
136  double Tolerance = 0.0;
137  double AbsoluteTolerance = 1.0;
138  bool RemovePointsWithoutCells = false;
140  int OutputPointsPrecision = vtkAlgorithm::DEFAULT_PRECISION;
141  int PointDataWeighingStrategy = FIRST_POINT;
142 
145 
146 private:
148  void operator=(const vtkCleanUnstructuredGrid&) = delete;
149 };
150 VTK_ABI_NAMESPACE_END
151 #endif
152 // VTK-HeaderTest-Exclude: vtkCleanUnstructuredGrid.h
virtual vtkIncrementalPointLocator * GetLocator()
Set/Get a spatial locator for speeding the search process.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
~vtkCleanUnstructuredGrid() override
virtual void SetLocator(vtkIncrementalPointLocator *locator)
Set/Get a spatial locator for speeding the search process.
void ReleaseLocator()
Release locator.
static vtkCleanUnstructuredGrid * New()
void CreateDefaultLocator(vtkDataSet *input=nullptr)
Create default locator.
vtkSmartPointer< vtkIncrementalPointLocator > Locator
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:53
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only unstructured grid as output.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154