VTK  9.2.6
vtkConstrainedSmoothingFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkConstrainedSmoothingFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
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 
66 class VTKFILTERSCORE_EXPORT vtkConstrainedSmoothingFilter : public vtkPointSetAlgorithm
67 {
68 public:
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_ARRAY = 2
117  };
118 
120 
129  vtkSetClampMacro(ConstraintStrategy, int, DEFAULT, CONSTRAINT_ARRAY);
130  vtkGetMacro(ConstraintStrategy, int);
131  void SetConstraintStrategyToDefault() { this->SetConstraintStrategy(DEFAULT); }
133  {
134  this->SetConstraintStrategy(CONSTRAINT_DISTANCE);
135  }
136  void SetConstraintStrategyToConstraintArray() { this->SetConstraintStrategy(CONSTRAINT_ARRAY); }
138 
140 
146  vtkSetClampMacro(ConstraintDistance, double, 0.0, VTK_FLOAT_MAX);
147  vtkGetMacro(ConstraintDistance, double);
149 
151 
158  vtkSetSmartPointerMacro(SmoothingStencils, vtkCellArray);
159  vtkGetSmartPointerMacro(SmoothingStencils, vtkCellArray);
161 
163 
167  vtkSetMacro(GenerateErrorScalars, bool);
168  vtkGetMacro(GenerateErrorScalars, bool);
169  vtkBooleanMacro(GenerateErrorScalars, bool);
171 
173 
177  vtkSetMacro(GenerateErrorVectors, bool);
178  vtkGetMacro(GenerateErrorVectors, bool);
179  vtkBooleanMacro(GenerateErrorVectors, bool);
181 
183 
188  vtkSetMacro(OutputPointsPrecision, int);
189  vtkGetMacro(OutputPointsPrecision, int);
191 
192 protected:
194  ~vtkConstrainedSmoothingFilter() override = default;
195 
196  double Convergence;
199 
203 
207 
209 
210 private:
212  void operator=(const vtkConstrainedSmoothingFilter&) = delete;
213 };
214 
215 #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:155
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:163
a simple class to control print indentation
Definition: vtkIndent.h:39
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:186
static vtkPointSetAlgorithm * New()
Store zero or more vtkInformation instances.
vtkSmartPointer< vtkCellArray > SmoothingStencils