VTK  9.2.5
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 
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
object to represent cell connectivity
Definition: vtkCellArray.h:296
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
~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:119
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:155
#define VTK_FLOAT_MAX
Definition: vtkType.h:163