VTK  9.3.1
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:
36  static vtkCleanUnstructuredGrid* New();
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);
74  virtual vtkIncrementalPointLocator* GetLocator();
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:
133  ~vtkCleanUnstructuredGrid() override;
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 
144  int FillInputPortInformation(int port, vtkInformation* info) override;
145 
146 private:
148  void operator=(const vtkCleanUnstructuredGrid&) = delete;
149 };
150 VTK_ABI_NAMESPACE_END
151 #endif
152 // VTK-HeaderTest-Exclude: vtkCleanUnstructuredGrid.h
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
void ReleaseLocator()
Release locator.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkSmartPointer< vtkIncrementalPointLocator > Locator
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
Superclass for algorithms that produce only unstructured grid as output.
Store zero or more vtkInformation instances.