VTK  9.7.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
59 #ifndef vtkConstrainedSmoothingFilter_h
60 #define vtkConstrainedSmoothingFilter_h
61 
62 #include "vtkCellArray.h" // For point smoothing stencils
63 #include "vtkFiltersCoreModule.h" // For export macro
64 #include "vtkPointSetAlgorithm.h"
65 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
66 
67 VTK_ABI_NAMESPACE_BEGIN
69  : public vtkPointSetAlgorithm
70 {
71 public:
73 
79  void PrintSelf(ostream& os, vtkIndent indent) override;
81 
83 
89  vtkSetClampMacro(Convergence, double, 0.0, 1.0);
90  vtkGetMacro(Convergence, double);
92 
94 
99  vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
100  vtkGetMacro(NumberOfIterations, int);
102 
104 
111  vtkSetMacro(RelaxationFactor, double);
112  vtkGetMacro(RelaxationFactor, double);
114 
116  {
117  DEFAULT = 0,
118  CONSTRAINT_DISTANCE = 1,
119  CONSTRAINT_BOX = 2,
120  CONSTRAINT_ARRAY = 3
121  };
122 
124 
138  vtkSetClampMacro(ConstraintStrategy, int, DEFAULT, CONSTRAINT_ARRAY);
139  vtkGetMacro(ConstraintStrategy, int);
140  void SetConstraintStrategyToDefault() { this->SetConstraintStrategy(DEFAULT); }
142  {
143  this->SetConstraintStrategy(CONSTRAINT_DISTANCE);
144  }
145  void SetConstraintStrategyToConstraintBox() { this->SetConstraintStrategy(CONSTRAINT_BOX); }
146  void SetConstraintStrategyToConstraintArray() { this->SetConstraintStrategy(CONSTRAINT_ARRAY); }
148 
150 
159  vtkSetClampMacro(ConstraintDistance, double, 0.0, VTK_FLOAT_MAX);
160  vtkGetMacro(ConstraintDistance, double);
162 
164 
171  vtkSetVector3Macro(ConstraintBox, double);
172  vtkGetVectorMacro(ConstraintBox, double, 3);
174 
176 
183  vtkSetSmartPointerMacro(SmoothingStencils, vtkCellArray);
184  vtkGetSmartPointerMacro(SmoothingStencils, vtkCellArray);
186 
188 
192  vtkSetMacro(GenerateErrorScalars, bool);
193  vtkGetMacro(GenerateErrorScalars, bool);
194  vtkBooleanMacro(GenerateErrorScalars, bool);
196 
198 
202  vtkSetMacro(GenerateErrorVectors, bool);
203  vtkGetMacro(GenerateErrorVectors, bool);
204  vtkBooleanMacro(GenerateErrorVectors, bool);
206 
208 
213  vtkSetMacro(OutputPointsPrecision, int);
214  vtkGetMacro(OutputPointsPrecision, int);
216 
217 protected:
219  ~vtkConstrainedSmoothingFilter() override = default;
220 
221  double Convergence;
224 
227  double ConstraintBox[3];
229 
233 
235 
236 private:
238  void operator=(const vtkConstrainedSmoothingFilter&) = delete;
239 };
240 VTK_ABI_NAMESPACE_END
241 
242 #endif
adjust point positions using constrained smoothing
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:192
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing instances of the class...
#define VTK_FLOAT_MAX
Definition: vtkType.h:200
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetConstraintStrategyToConstraintArray()
Indicate how to apply constraints.
Superclass for algorithms that process vtkPointSet input.
void SetConstraintStrategyToConstraintDistance()
Indicate how to apply constraints.
void SetConstraintStrategyToDefault()
Indicate how to apply constraints.
object to represent cell connectivity
Definition: vtkCellArray.h:177
static vtkPointSetAlgorithm * New()
Standard methods for instantiation, obtaining type information, and printing instances of the class...
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void SetConstraintStrategyToConstraintBox()
Indicate how to apply constraints.
vtkSmartPointer< vtkCellArray > SmoothingStencils