VTK  9.3.20240329
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
125 #ifndef vtkSmoothPolyDataFilter_h
126 #define vtkSmoothPolyDataFilter_h
127 
128 #include "vtkFiltersCoreModule.h" // For export macro
129 #include "vtkPolyDataAlgorithm.h"
130 #include <memory> // For std::unique_ptr<>
131 
132 VTK_ABI_NAMESPACE_BEGIN
133 class vtkSmoothPoints;
134 
135 class VTKFILTERSCORE_EXPORT vtkSmoothPolyDataFilter : public vtkPolyDataAlgorithm
136 {
137 public:
146 
148 
153  void PrintSelf(ostream& os, vtkIndent indent) override;
155 
157 
161  vtkSetClampMacro(Convergence, double, 0.0, 1.0);
162  vtkGetMacro(Convergence, double);
164 
166 
169  vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
170  vtkGetMacro(NumberOfIterations, int);
172 
174 
181  vtkSetMacro(RelaxationFactor, double);
182  vtkGetMacro(RelaxationFactor, double);
184 
186 
189  vtkSetMacro(FeatureEdgeSmoothing, vtkTypeBool);
190  vtkGetMacro(FeatureEdgeSmoothing, vtkTypeBool);
191  vtkBooleanMacro(FeatureEdgeSmoothing, vtkTypeBool);
193 
195 
198  vtkSetClampMacro(FeatureAngle, double, 0.0, 180.0);
199  vtkGetMacro(FeatureAngle, double);
201 
203 
207  vtkSetClampMacro(EdgeAngle, double, 0.0, 180.0);
208  vtkGetMacro(EdgeAngle, double);
210 
212 
215  vtkSetMacro(BoundarySmoothing, vtkTypeBool);
216  vtkGetMacro(BoundarySmoothing, vtkTypeBool);
217  vtkBooleanMacro(BoundarySmoothing, vtkTypeBool);
219 
221 
224  vtkSetMacro(GenerateErrorScalars, vtkTypeBool);
225  vtkGetMacro(GenerateErrorScalars, vtkTypeBool);
226  vtkBooleanMacro(GenerateErrorScalars, vtkTypeBool);
228 
230 
233  vtkSetMacro(GenerateErrorVectors, vtkTypeBool);
234  vtkGetMacro(GenerateErrorVectors, vtkTypeBool);
235  vtkBooleanMacro(GenerateErrorVectors, vtkTypeBool);
237 
239 
247 
249 
254  vtkSetMacro(OutputPointsPrecision, int);
255  vtkGetMacro(OutputPointsPrecision, int);
257 
258 protected:
261 
264 
265  double Convergence;
269  double FeatureAngle;
270  double EdgeAngle;
275 
276  std::unique_ptr<vtkSmoothPoints> SmoothPoints;
277 
278 private:
280  void operator=(const vtkSmoothPolyDataFilter&) = delete;
281 };
282 
283 VTK_ABI_NAMESPACE_END
284 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
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:181
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