VTK  9.3.20240418
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 
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 
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); }
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 
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:
214  ~vtkConstrainedSmoothingFilter() override = default;
215 
216  double Convergence;
219 
222  double ConstraintBox[3];
224 
228 
230 
231 private:
233  void operator=(const vtkConstrainedSmoothingFilter&) = delete;
234 };
235 VTK_ABI_NAMESPACE_END
236 
237 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:286
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...
vtkSetSmartPointerMacro(SmoothingStencils, vtkCellArray)
Set / get the point smoothing stencils.
void SetConstraintStrategyToConstraintArray()
Indicate how to apply constraints.
vtkGetSmartPointerMacro(SmoothingStencils, vtkCellArray)
Set / get the point smoothing stencils.
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.
#define VTK_INT_MAX
Definition: vtkType.h:144
#define VTK_FLOAT_MAX
Definition: vtkType.h:152