VTK: Filters/Core/vtkSmoothPolyDataFilter.h Source File

| VTK 9.3.1

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:
115 static vtkSmoothPolyDataFilter* New();
116
118
122 vtkTypeMacro(vtkSmoothPolyDataFilter, vtkPolyDataAlgorithm);
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
214 void SetSourceData(vtkPolyData* source);
215 vtkPolyData* GetSource();
217
219
224 vtkSetMacro(OutputPointsPrecision, int);
225 vtkGetMacro(OutputPointsPrecision, int);
227
228 protected:
229 vtkSmoothPolyDataFilter();
230 ~vtkSmoothPolyDataFilter() override;
231
232 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
233 int FillInputPortInformation(int port, vtkInformation* info) override;
234
235 double Convergence;
236 int NumberOfIterations;
237 double RelaxationFactor;
238 vtkTypeBool FeatureEdgeSmoothing;
239 double FeatureAngle;
240 double EdgeAngle;
241 vtkTypeBool BoundarySmoothing;
242 vtkTypeBool GenerateErrorScalars;
243 vtkTypeBool GenerateErrorVectors;
244 int OutputPointsPrecision;
245
246 std::unique_ptr<vtkSmoothPoints> SmoothPoints;
247
248 private:
249 vtkSmoothPolyDataFilter(const vtkSmoothPolyDataFilter&) = delete;
250 void operator=(const vtkSmoothPolyDataFilter&) = delete;
251 };
252
253 VTK_ABI_NAMESPACE_END
254 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkSmoothPolyDataFilter
adjust point positions using Laplacian smoothing
Definition: vtkSmoothPolyDataFilter.h:106
vtkSmoothPolyDataFilter::NumberOfIterations
int NumberOfIterations
Definition: vtkSmoothPolyDataFilter.h:236
vtkSmoothPolyDataFilter::vtkSmoothPolyDataFilter
vtkSmoothPolyDataFilter()
vtkSmoothPolyDataFilter::BoundarySmoothing
vtkTypeBool BoundarySmoothing
Definition: vtkSmoothPolyDataFilter.h:241
vtkSmoothPolyDataFilter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkSmoothPolyDataFilter::RelaxationFactor
double RelaxationFactor
Definition: vtkSmoothPolyDataFilter.h:237
vtkSmoothPolyDataFilter::GenerateErrorScalars
vtkTypeBool GenerateErrorScalars
Definition: vtkSmoothPolyDataFilter.h:242
vtkSmoothPolyDataFilter::SmoothPoints
std::unique_ptr< vtkSmoothPoints > SmoothPoints
Definition: vtkSmoothPolyDataFilter.h:246
vtkSmoothPolyDataFilter::New
static vtkSmoothPolyDataFilter * New()
Construct object with number of iterations 20; relaxation factor .01; feature edge smoothing turned o...
vtkSmoothPolyDataFilter::GenerateErrorVectors
vtkTypeBool GenerateErrorVectors
Definition: vtkSmoothPolyDataFilter.h:243
vtkSmoothPolyDataFilter::Convergence
double Convergence
Definition: vtkSmoothPolyDataFilter.h:235
vtkSmoothPolyDataFilter::~vtkSmoothPolyDataFilter
~vtkSmoothPolyDataFilter() override
vtkSmoothPolyDataFilter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkSmoothPolyDataFilter.h:244
vtkSmoothPolyDataFilter::FeatureAngle
double FeatureAngle
Definition: vtkSmoothPolyDataFilter.h:239
vtkSmoothPolyDataFilter::SetSourceData
void SetSourceData(vtkPolyData *source)
Specify the source object which is used to constrain smoothing.
vtkSmoothPolyDataFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods to obtain type information, and print the state of a class instance.
vtkSmoothPolyDataFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSmoothPolyDataFilter::EdgeAngle
double EdgeAngle
Definition: vtkSmoothPolyDataFilter.h:240
vtkSmoothPolyDataFilter::FeatureEdgeSmoothing
vtkTypeBool FeatureEdgeSmoothing
Definition: vtkSmoothPolyDataFilter.h:238
vtkSmoothPolyDataFilter::GetSource
vtkPolyData * GetSource()
Specify the source object which is used to constrain smoothing.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:964
vtkPolyDataAlgorithm.h
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:144