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
86 #ifndef vtkSmoothPolyDataFilter_h
87 #define vtkSmoothPolyDataFilter_h
88 
89 #include "vtkFiltersCoreModule.h" // For export macro
90 #include "vtkPolyDataAlgorithm.h"
91 #include <memory> // For std::unique_ptr<>
92 
93 VTK_ABI_NAMESPACE_BEGIN
94 class vtkSmoothPoints;
95 
96 class VTKFILTERSCORE_EXPORT vtkSmoothPolyDataFilter : public vtkPolyDataAlgorithm
97 {
98 public:
107 
109 
114  void PrintSelf(ostream& os, vtkIndent indent) override;
116 
118 
122  vtkSetClampMacro(Convergence, double, 0.0, 1.0);
123  vtkGetMacro(Convergence, double);
125 
127 
130  vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
131  vtkGetMacro(NumberOfIterations, int);
133 
135 
142  vtkSetMacro(RelaxationFactor, double);
143  vtkGetMacro(RelaxationFactor, double);
145 
147 
150  vtkSetMacro(FeatureEdgeSmoothing, vtkTypeBool);
151  vtkGetMacro(FeatureEdgeSmoothing, vtkTypeBool);
152  vtkBooleanMacro(FeatureEdgeSmoothing, vtkTypeBool);
154 
156 
159  vtkSetClampMacro(FeatureAngle, double, 0.0, 180.0);
160  vtkGetMacro(FeatureAngle, double);
162 
164 
168  vtkSetClampMacro(EdgeAngle, double, 0.0, 180.0);
169  vtkGetMacro(EdgeAngle, double);
171 
173 
176  vtkSetMacro(BoundarySmoothing, vtkTypeBool);
177  vtkGetMacro(BoundarySmoothing, vtkTypeBool);
178  vtkBooleanMacro(BoundarySmoothing, vtkTypeBool);
180 
182 
185  vtkSetMacro(GenerateErrorScalars, vtkTypeBool);
186  vtkGetMacro(GenerateErrorScalars, vtkTypeBool);
187  vtkBooleanMacro(GenerateErrorScalars, vtkTypeBool);
189 
191 
194  vtkSetMacro(GenerateErrorVectors, vtkTypeBool);
195  vtkGetMacro(GenerateErrorVectors, vtkTypeBool);
196  vtkBooleanMacro(GenerateErrorVectors, vtkTypeBool);
198 
200 
208 
210 
215  vtkSetMacro(OutputPointsPrecision, int);
216  vtkGetMacro(OutputPointsPrecision, int);
218 
219 protected:
222 
225 
226  double Convergence;
230  double FeatureAngle;
231  double EdgeAngle;
236 
237  std::unique_ptr<vtkSmoothPoints> SmoothPoints;
238 
239 private:
241  void operator=(const vtkSmoothPolyDataFilter&) = delete;
242 };
243 
244 VTK_ABI_NAMESPACE_END
245 #endif
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 polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:80
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