VTK  9.5.20250912
vtkConstrainedSmoothingFilter.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
56#ifndef vtkConstrainedSmoothingFilter_h
57#define vtkConstrainedSmoothingFilter_h
58
59#include "vtkCellArray.h" // For point smoothing stencils
60#include "vtkFiltersCoreModule.h" // For export macro
62#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
63
64VTK_ABI_NAMESPACE_BEGIN
67{
68public:
70
76 void PrintSelf(ostream& os, vtkIndent indent) override;
78
80
86 vtkSetClampMacro(Convergence, double, 0.0, 1.0);
87 vtkGetMacro(Convergence, double);
89
91
96 vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
97 vtkGetMacro(NumberOfIterations, int);
99
101
108 vtkSetMacro(RelaxationFactor, double);
109 vtkGetMacro(RelaxationFactor, double);
111
113 {
114 DEFAULT = 0,
115 CONSTRAINT_DISTANCE = 1,
116 CONSTRAINT_BOX = 2,
117 CONSTRAINT_ARRAY = 3
118 };
119
121
135 vtkSetClampMacro(ConstraintStrategy, int, DEFAULT, CONSTRAINT_ARRAY);
136 vtkGetMacro(ConstraintStrategy, int);
137 void SetConstraintStrategyToDefault() { this->SetConstraintStrategy(DEFAULT); }
139 {
140 this->SetConstraintStrategy(CONSTRAINT_DISTANCE);
141 }
142 void SetConstraintStrategyToConstraintBox() { this->SetConstraintStrategy(CONSTRAINT_BOX); }
143 void SetConstraintStrategyToConstraintArray() { this->SetConstraintStrategy(CONSTRAINT_ARRAY); }
145
147
156 vtkSetClampMacro(ConstraintDistance, double, 0.0, VTK_FLOAT_MAX);
157 vtkGetMacro(ConstraintDistance, double);
159
161
168 vtkSetVector3Macro(ConstraintBox, double);
169 vtkGetVectorMacro(ConstraintBox, double, 3);
171
173
180 vtkSetSmartPointerMacro(SmoothingStencils, vtkCellArray);
181 vtkGetSmartPointerMacro(SmoothingStencils, vtkCellArray);
183
185
189 vtkSetMacro(GenerateErrorScalars, bool);
190 vtkGetMacro(GenerateErrorScalars, bool);
191 vtkBooleanMacro(GenerateErrorScalars, bool);
193
195
199 vtkSetMacro(GenerateErrorVectors, bool);
200 vtkGetMacro(GenerateErrorVectors, bool);
201 vtkBooleanMacro(GenerateErrorVectors, bool);
203
205
210 vtkSetMacro(OutputPointsPrecision, int);
211 vtkGetMacro(OutputPointsPrecision, int);
213
214protected:
216 ~vtkConstrainedSmoothingFilter() override = default;
217
221
224 double ConstraintBox[3];
226
230
232
233private:
235 void operator=(const vtkConstrainedSmoothingFilter&) = delete;
236};
237VTK_ABI_NAMESPACE_END
238
239#endif
object to represent cell connectivity
adjust point positions using constrained smoothing
void SetConstraintStrategyToConstraintDistance()
Indicate how to apply constraints.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSmartPointer< vtkCellArray > SmoothingStencils
void SetConstraintStrategyToConstraintBox()
Indicate how to apply constraints.
~vtkConstrainedSmoothingFilter() override=default
void SetConstraintStrategyToDefault()
Indicate how to apply constraints.
static vtkConstrainedSmoothingFilter * New()
Standard methods for instantiation, to obtain type information, and print the state of a class instan...
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, to obtain type information, and print the state of a class instan...
void SetConstraintStrategyToConstraintArray()
Indicate how to apply constraints.
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 output of the same type as input.
Hold a reference to a vtkObjectBase instance.
#define VTK_INT_MAX
Definition vtkType.h:162
#define VTK_FLOAT_MAX
Definition vtkType.h:170
#define VTK_MARSHALAUTO