VTK  9.3.20240423
vtkPointSmoothingFilter.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
86#ifndef vtkPointSmoothingFilter_h
87#define vtkPointSmoothingFilter_h
88
89#include "vtkFiltersPointsModule.h" // For export macro
91
92VTK_ABI_NAMESPACE_BEGIN
94class vtkDataArray;
95class vtkPlane;
96
97class VTKFILTERSPOINTS_EXPORT vtkPointSmoothingFilter : public vtkPointSetAlgorithm
98{
99public:
101
107 void PrintSelf(ostream& os, vtkIndent indent) override;
109
111
115 vtkSetClampMacro(NeighborhoodSize, int, 4, 128);
116 vtkGetMacro(NeighborhoodSize, int);
118
122 enum
123 {
124 DEFAULT_SMOOTHING = 0,
129 FRAME_FIELD_SMOOTHING
130 };
131
133
143 vtkSetClampMacro(SmoothingMode, int, DEFAULT_SMOOTHING, FRAME_FIELD_SMOOTHING);
144 vtkGetMacro(SmoothingMode, int);
145 void SetSmoothingModeToDefault() { this->SetSmoothingMode(DEFAULT_SMOOTHING); }
146 void SetSmoothingModeToGeometric() { this->SetSmoothingMode(GEOMETRIC_SMOOTHING); }
147 void SetSmoothingModeToUniform() { this->SetSmoothingMode(UNIFORM_SMOOTHING); }
148 void SetSmoothingModeToScalars() { this->SetSmoothingMode(SCALAR_SMOOTHING); }
149 void SetSmoothingModeToTensors() { this->SetSmoothingMode(TENSOR_SMOOTHING); }
150 void SetSmoothingModeToFrameField() { this->SetSmoothingMode(FRAME_FIELD_SMOOTHING); }
152
154
159 vtkGetObjectMacro(FrameFieldArray, vtkDataArray);
161
163
166 vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
167 vtkGetMacro(NumberOfIterations, int);
169
171
175 vtkSetClampMacro(NumberOfSubIterations, int, 1, VTK_INT_MAX);
176 vtkGetMacro(NumberOfSubIterations, int);
178
180
188 vtkSetClampMacro(MaximumStepSize, double, 0.0, VTK_DOUBLE_MAX);
189 vtkGetMacro(MaximumStepSize, double);
191
193
197 vtkSetClampMacro(Convergence, double, 0.0, 1.0);
198 vtkGetMacro(Convergence, double);
200
202
214 vtkSetMacro(EnableConstraints, bool);
215 vtkGetMacro(EnableConstraints, bool);
216 vtkBooleanMacro(EnableConstraints, bool);
217 vtkSetClampMacro(FixedAngle, double, 0, 90);
218 vtkGetMacro(FixedAngle, double);
219 vtkSetClampMacro(BoundaryAngle, double, 0, 120);
220 vtkGetMacro(BoundaryAngle, double);
222
224
228 vtkSetMacro(GenerateConstraintScalars, bool);
229 vtkGetMacro(GenerateConstraintScalars, bool);
230 vtkBooleanMacro(GenerateConstraintScalars, bool);
232
234
238 vtkSetMacro(GenerateConstraintNormals, bool);
239 vtkGetMacro(GenerateConstraintNormals, bool);
240 vtkBooleanMacro(GenerateConstraintNormals, bool);
242
244
250 vtkSetMacro(ComputePackingRadius, bool);
251 vtkGetMacro(ComputePackingRadius, bool);
252 vtkBooleanMacro(ComputePackingRadius, bool);
254
256
266 vtkSetClampMacro(PackingRadius, double, 0.0, VTK_DOUBLE_MAX);
267 vtkGetMacro(PackingRadius, double);
269
271
280 vtkSetClampMacro(PackingFactor, double, 0.1, 10.0);
281 vtkGetMacro(PackingFactor, double);
283
285
292 vtkSetClampMacro(AttractionFactor, double, 0.1, 10.0);
293 vtkGetMacro(AttractionFactor, double);
295
299 enum
300 {
301 UNCONSTRAINED_MOTION = 0,
302 PLANE_MOTION
303 };
304
306
311 vtkSetMacro(MotionConstraint, int);
312 vtkGetMacro(MotionConstraint, int);
313 void SetMotionConstraintToUnconstrained() { this->SetMotionConstraint(UNCONSTRAINED_MOTION); }
314 void SetMotionConstraintToPlane() { this->SetMotionConstraint(PLANE_MOTION); }
316
318
323 vtkGetObjectMacro(Plane, vtkPlane);
325
327
333 vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
335
336protected:
339
340 // Control the smoothing
348
349 // Support the algorithm
351
352 // Constraints
358
359 // Packing radius and related
364
365 // Motion constraints
368
369 // Pipeline support
371 int FillInputPortInformation(int port, vtkInformation* info) override;
372
373private:
375 void operator=(const vtkPointSmoothingFilter&) = delete;
376};
377
378VTK_ABI_NAMESPACE_END
379#endif
abstract class to quickly locate points in 3-space
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
perform various plane computations
Definition vtkPlane.h:135
Superclass for algorithms that produce output of the same type as input.
adjust point positions to form a pleasing, packed arrangement
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual void SetFrameFieldArray(vtkDataArray *)
Specify the name of the frame field to use for smoothing.
void SetSmoothingModeToUniform()
Control how smoothing is to be performed.
void SetPlane(vtkPlane *)
Specify the plane to which point motion is constrained.
void SetLocator(vtkAbstractPointLocator *locator)
Specify a point locator.
static vtkPointSmoothingFilter * New()
Standard methods for instantiation, obtaining type information, and printing information.
void SetSmoothingModeToFrameField()
Control how smoothing is to be performed.
void SetSmoothingModeToDefault()
Control how smoothing is to be performed.
void SetSmoothingModeToTensors()
Control how smoothing is to be performed.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetMotionConstraintToPlane()
Specify how to constrain the motion of points.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing information.
vtkAbstractPointLocator * Locator
void SetSmoothingModeToGeometric()
Control how smoothing is to be performed.
void SetSmoothingModeToScalars()
Control how smoothing is to be performed.
~vtkPointSmoothingFilter() override
void SetMotionConstraintToUnconstrained()
Specify how to constrain the motion of points.
#define VTK_DOUBLE_MAX
Definition vtkType.h:154
#define VTK_INT_MAX
Definition vtkType.h:144