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 
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 
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:
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
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:144
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_FLOAT_MAX
Definition: vtkType.h:152
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetConstraintStrategyToConstraintArray()
Indicate how to apply constraints.
Superclass for algorithms that produce output of the same type as input.
void SetConstraintStrategyToConstraintDistance()
Indicate how to apply constraints.
void SetConstraintStrategyToDefault()
Indicate how to apply constraints.
object to represent cell connectivity
Definition: vtkCellArray.h:175
static vtkPointSetAlgorithm * New()
Store zero or more vtkInformation instances.
void SetConstraintStrategyToConstraintBox()
Indicate how to apply constraints.
vtkSmartPointer< vtkCellArray > SmoothingStencils