VTK: Filters/Core/vtkConstrainedSmoothingFilter.h Source File

| VTK 9.3.1

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
61 #include "vtkPointSetAlgorithm.h"
62
63 VTK_ABI_NAMESPACE_BEGIN
64 class VTKFILTERSCORE_EXPORT vtkConstrainedSmoothingFilter : public vtkPointSetAlgorithm
65 {
66 public:
68
72 static vtkConstrainedSmoothingFilter* New();
73 vtkTypeMacro(vtkConstrainedSmoothingFilter, vtkPointSetAlgorithm);
74 void PrintSelf(ostream& os, vtkIndent indent) override;
76
78
84 vtkSetClampMacro(Convergence, double, 0.0, 1.0);
85 vtkGetMacro(Convergence, double);
87
89
94 vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
95 vtkGetMacro(NumberOfIterations, int);
97
99
106 vtkSetMacro(RelaxationFactor, double);
107 vtkGetMacro(RelaxationFactor, double);
109
110 enum ConstraintStrategyType
111 {
112 DEFAULT = 0,
113 CONSTRAINT_DISTANCE = 1,
114 CONSTRAINT_BOX = 2,
115 CONSTRAINT_ARRAY = 3
116 };
117
119
133 vtkSetClampMacro(ConstraintStrategy, int, DEFAULT, CONSTRAINT_ARRAY);
134 vtkGetMacro(ConstraintStrategy, int);
135 void SetConstraintStrategyToDefault() { this->SetConstraintStrategy(DEFAULT); }
136 void SetConstraintStrategyToConstraintDistance()
137 {
138 this->SetConstraintStrategy(CONSTRAINT_DISTANCE);
139 }
140 void SetConstraintStrategyToConstraintBox() { this->SetConstraintStrategy(CONSTRAINT_BOX); }
141 void SetConstraintStrategyToConstraintArray() { this->SetConstraintStrategy(CONSTRAINT_ARRAY); }
143
145
154 vtkSetClampMacro(ConstraintDistance, double, 0.0, VTK_FLOAT_MAX);
155 vtkGetMacro(ConstraintDistance, double);
157
159
166 vtkSetVector3Macro(ConstraintBox, double);
167 vtkGetVectorMacro(ConstraintBox, double, 3);
169
171
178 vtkSetSmartPointerMacro(SmoothingStencils, vtkCellArray);
179 vtkGetSmartPointerMacro(SmoothingStencils, vtkCellArray);
181
183
187 vtkSetMacro(GenerateErrorScalars, bool);
188 vtkGetMacro(GenerateErrorScalars, bool);
189 vtkBooleanMacro(GenerateErrorScalars, bool);
191
193
197 vtkSetMacro(GenerateErrorVectors, bool);
198 vtkGetMacro(GenerateErrorVectors, bool);
199 vtkBooleanMacro(GenerateErrorVectors, bool);
201
203
208 vtkSetMacro(OutputPointsPrecision, int);
209 vtkGetMacro(OutputPointsPrecision, int);
211
212 protected:
213 vtkConstrainedSmoothingFilter();
214 ~vtkConstrainedSmoothingFilter() override = default;
215
216 double Convergence;
217 int NumberOfIterations;
218 double RelaxationFactor;
219
220 int ConstraintStrategy;
221 double ConstraintDistance;
222 double ConstraintBox[3];
223 vtkSmartPointer<vtkCellArray> SmoothingStencils;
224
225 bool GenerateErrorScalars;
226 bool GenerateErrorVectors;
227 int OutputPointsPrecision;
228
229 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
230
231 private:
232 vtkConstrainedSmoothingFilter(const vtkConstrainedSmoothingFilter&) = delete;
233 void operator=(const vtkConstrainedSmoothingFilter&) = delete;
234 };
235 VTK_ABI_NAMESPACE_END
236
237 #endif
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:185
vtkConstrainedSmoothingFilter
adjust point positions using constrained smoothing
Definition: vtkConstrainedSmoothingFilter.h:65
vtkConstrainedSmoothingFilter::SetConstraintStrategyToConstraintDistance
void SetConstraintStrategyToConstraintDistance()
Indicate how to apply constraints.
Definition: vtkConstrainedSmoothingFilter.h:136
vtkConstrainedSmoothingFilter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkConstrainedSmoothingFilter.h:227
vtkConstrainedSmoothingFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkConstrainedSmoothingFilter::SmoothingStencils
vtkSmartPointer< vtkCellArray > SmoothingStencils
Definition: vtkConstrainedSmoothingFilter.h:223
vtkConstrainedSmoothingFilter::SetConstraintStrategyToConstraintBox
void SetConstraintStrategyToConstraintBox()
Indicate how to apply constraints.
Definition: vtkConstrainedSmoothingFilter.h:140
vtkConstrainedSmoothingFilter::GenerateErrorVectors
bool GenerateErrorVectors
Definition: vtkConstrainedSmoothingFilter.h:226
vtkConstrainedSmoothingFilter::~vtkConstrainedSmoothingFilter
~vtkConstrainedSmoothingFilter() override=default
vtkConstrainedSmoothingFilter::SetConstraintStrategyToDefault
void SetConstraintStrategyToDefault()
Indicate how to apply constraints.
Definition: vtkConstrainedSmoothingFilter.h:135
vtkConstrainedSmoothingFilter::ConstraintDistance
double ConstraintDistance
Definition: vtkConstrainedSmoothingFilter.h:221
vtkConstrainedSmoothingFilter::GenerateErrorScalars
bool GenerateErrorScalars
Definition: vtkConstrainedSmoothingFilter.h:225
vtkConstrainedSmoothingFilter::New
static vtkConstrainedSmoothingFilter * New()
Standard methods for instantiation, to obtain type information, and print the state of a class instan...
vtkConstrainedSmoothingFilter::ConstraintStrategy
int ConstraintStrategy
Definition: vtkConstrainedSmoothingFilter.h:220
vtkConstrainedSmoothingFilter::vtkConstrainedSmoothingFilter
vtkConstrainedSmoothingFilter()
vtkConstrainedSmoothingFilter::Convergence
double Convergence
Definition: vtkConstrainedSmoothingFilter.h:216
vtkConstrainedSmoothingFilter::RelaxationFactor
double RelaxationFactor
Definition: vtkConstrainedSmoothingFilter.h:218
vtkConstrainedSmoothingFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, to obtain type information, and print the state of a class instan...
vtkConstrainedSmoothingFilter::NumberOfIterations
int NumberOfIterations
Definition: vtkConstrainedSmoothingFilter.h:217
vtkConstrainedSmoothingFilter::vtkSetSmartPointerMacro
vtkSetSmartPointerMacro(SmoothingStencils, vtkCellArray)
Set / get the point smoothing stencils.
vtkConstrainedSmoothingFilter::SetConstraintStrategyToConstraintArray
void SetConstraintStrategyToConstraintArray()
Indicate how to apply constraints.
Definition: vtkConstrainedSmoothingFilter.h:141
vtkConstrainedSmoothingFilter::ConstraintStrategyType
ConstraintStrategyType
Definition: vtkConstrainedSmoothingFilter.h:111
vtkConstrainedSmoothingFilter::vtkGetSmartPointerMacro
vtkGetSmartPointerMacro(SmoothingStencils, vtkCellArray)
Set / get the point smoothing stencils.
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
vtkPointSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPointSetAlgorithm.h:33
vtkSmartPointer< vtkCellArray >
vtkCellArray.h
vtkPointSetAlgorithm.h
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:144
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:152