VTK  9.3.0
vtkSmoothPolyDataFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
95 #ifndef vtkSmoothPolyDataFilter_h
96 #define vtkSmoothPolyDataFilter_h
97 
98 #include "vtkFiltersCoreModule.h" // For export macro
99 #include "vtkPolyDataAlgorithm.h"
100 #include <memory> // For std::unique_ptr<>
101 
102 VTK_ABI_NAMESPACE_BEGIN
103 class vtkSmoothPoints;
104 
105 class VTKFILTERSCORE_EXPORT vtkSmoothPolyDataFilter : public vtkPolyDataAlgorithm
106 {
107 public:
116 
118 
123  void PrintSelf(ostream& os, vtkIndent indent) override;
125 
127 
131  vtkSetClampMacro(Convergence, double, 0.0, 1.0);
132  vtkGetMacro(Convergence, double);
134 
136 
139  vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
140  vtkGetMacro(NumberOfIterations, int);
142 
144 
151  vtkSetMacro(RelaxationFactor, double);
152  vtkGetMacro(RelaxationFactor, double);
154 
156 
159  vtkSetMacro(FeatureEdgeSmoothing, vtkTypeBool);
160  vtkGetMacro(FeatureEdgeSmoothing, vtkTypeBool);
161  vtkBooleanMacro(FeatureEdgeSmoothing, vtkTypeBool);
163 
165 
168  vtkSetClampMacro(FeatureAngle, double, 0.0, 180.0);
169  vtkGetMacro(FeatureAngle, double);
171 
173 
177  vtkSetClampMacro(EdgeAngle, double, 0.0, 180.0);
178  vtkGetMacro(EdgeAngle, double);
180 
182 
185  vtkSetMacro(BoundarySmoothing, vtkTypeBool);
186  vtkGetMacro(BoundarySmoothing, vtkTypeBool);
187  vtkBooleanMacro(BoundarySmoothing, vtkTypeBool);
189 
191 
194  vtkSetMacro(GenerateErrorScalars, vtkTypeBool);
195  vtkGetMacro(GenerateErrorScalars, vtkTypeBool);
196  vtkBooleanMacro(GenerateErrorScalars, vtkTypeBool);
198 
200 
203  vtkSetMacro(GenerateErrorVectors, vtkTypeBool);
204  vtkGetMacro(GenerateErrorVectors, vtkTypeBool);
205  vtkBooleanMacro(GenerateErrorVectors, vtkTypeBool);
207 
209 
217 
219 
224  vtkSetMacro(OutputPointsPrecision, int);
225  vtkGetMacro(OutputPointsPrecision, int);
227 
228 protected:
231 
234 
235  double Convergence;
239  double FeatureAngle;
240  double EdgeAngle;
245 
246  std::unique_ptr<vtkSmoothPoints> SmoothPoints;
247 
248 private:
250  void operator=(const vtkSmoothPolyDataFilter&) = delete;
251 };
252 
253 VTK_ABI_NAMESPACE_END
254 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
adjust point positions using Laplacian smoothing
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
std::unique_ptr< vtkSmoothPoints > SmoothPoints
static vtkSmoothPolyDataFilter * New()
Construct object with number of iterations 20; relaxation factor .01; feature edge smoothing turned o...
~vtkSmoothPolyDataFilter() override
void SetSourceData(vtkPolyData *source)
Specify the source object which is used to constrain smoothing.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods to obtain type information, and print the state of a class instance.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkPolyData * GetSource()
Specify the source object which is used to constrain smoothing.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkTypeBool
Definition: vtkABI.h:64
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_INT_MAX
Definition: vtkType.h:144