VTK  9.2.5
vtkPointSmoothingFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPointSmoothingFilter.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=========================================================================*/
98#ifndef vtkPointSmoothingFilter_h
99#define vtkPointSmoothingFilter_h
100
101#include "vtkFiltersPointsModule.h" // For export macro
102#include "vtkPointSetAlgorithm.h"
103
105class vtkDataArray;
106class vtkPlane;
107
108class VTKFILTERSPOINTS_EXPORT vtkPointSmoothingFilter : public vtkPointSetAlgorithm
109{
110public:
112
118 void PrintSelf(ostream& os, vtkIndent indent) override;
120
122
126 vtkSetClampMacro(NeighborhoodSize, int, 4, 128);
127 vtkGetMacro(NeighborhoodSize, int);
129
133 enum
134 {
135 DEFAULT_SMOOTHING = 0,
140 FRAME_FIELD_SMOOTHING
141 };
142
144
154 vtkSetClampMacro(SmoothingMode, int, DEFAULT_SMOOTHING, FRAME_FIELD_SMOOTHING);
155 vtkGetMacro(SmoothingMode, int);
156 void SetSmoothingModeToDefault() { this->SetSmoothingMode(DEFAULT_SMOOTHING); }
157 void SetSmoothingModeToGeometric() { this->SetSmoothingMode(GEOMETRIC_SMOOTHING); }
158 void SetSmoothingModeToUniform() { this->SetSmoothingMode(UNIFORM_SMOOTHING); }
159 void SetSmoothingModeToScalars() { this->SetSmoothingMode(SCALAR_SMOOTHING); }
160 void SetSmoothingModeToTensors() { this->SetSmoothingMode(TENSOR_SMOOTHING); }
161 void SetSmoothingModeToFrameField() { this->SetSmoothingMode(FRAME_FIELD_SMOOTHING); }
163
165
170 vtkGetObjectMacro(FrameFieldArray, vtkDataArray);
172
174
177 vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
178 vtkGetMacro(NumberOfIterations, int);
180
182
186 vtkSetClampMacro(NumberOfSubIterations, int, 1, VTK_INT_MAX);
187 vtkGetMacro(NumberOfSubIterations, int);
189
191
199 vtkSetClampMacro(MaximumStepSize, double, 0.0, VTK_DOUBLE_MAX);
200 vtkGetMacro(MaximumStepSize, double);
202
204
208 vtkSetClampMacro(Convergence, double, 0.0, 1.0);
209 vtkGetMacro(Convergence, double);
211
213
225 vtkSetMacro(EnableConstraints, bool);
226 vtkGetMacro(EnableConstraints, bool);
227 vtkBooleanMacro(EnableConstraints, bool);
228 vtkSetClampMacro(FixedAngle, double, 0, 90);
229 vtkGetMacro(FixedAngle, double);
230 vtkSetClampMacro(BoundaryAngle, double, 0, 120);
231 vtkGetMacro(BoundaryAngle, double);
233
235
239 vtkSetMacro(GenerateConstraintScalars, bool);
240 vtkGetMacro(GenerateConstraintScalars, bool);
241 vtkBooleanMacro(GenerateConstraintScalars, bool);
243
245
249 vtkSetMacro(GenerateConstraintNormals, bool);
250 vtkGetMacro(GenerateConstraintNormals, bool);
251 vtkBooleanMacro(GenerateConstraintNormals, bool);
253
255
261 vtkSetMacro(ComputePackingRadius, bool);
262 vtkGetMacro(ComputePackingRadius, bool);
263 vtkBooleanMacro(ComputePackingRadius, bool);
265
267
277 vtkSetClampMacro(PackingRadius, double, 0.0, VTK_DOUBLE_MAX);
278 vtkGetMacro(PackingRadius, double);
280
282
291 vtkSetClampMacro(PackingFactor, double, 0.1, 10.0);
292 vtkGetMacro(PackingFactor, double);
294
296
303 vtkSetClampMacro(AttractionFactor, double, 0.1, 10.0);
304 vtkGetMacro(AttractionFactor, double);
306
310 enum
311 {
312 UNCONSTRAINED_MOTION = 0,
313 PLANE_MOTION
314 };
315
317
322 vtkSetMacro(MotionConstraint, int);
323 vtkGetMacro(MotionConstraint, int);
324 void SetMotionConstraintToUnconstrained() { this->SetMotionConstraint(UNCONSTRAINED_MOTION); }
325 void SetMotionConstraintToPlane() { this->SetMotionConstraint(PLANE_MOTION); }
327
329
334 vtkGetObjectMacro(Plane, vtkPlane);
336
338
344 vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
346
347protected:
350
351 // Control the smoothing
359
360 // Support the algorithm
362
363 // Constraints
369
370 // Packing radius and related
375
376 // Motion constraints
379
380 // Pipeline support
382 int FillInputPortInformation(int port, vtkInformation* info) override;
383
384private:
386 void operator=(const vtkPointSmoothingFilter&) = delete;
387};
388
389#endif
abstract class to quickly locate points in 3-space
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:56
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
perform various plane computations
Definition: vtkPlane.h:37
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:165
#define VTK_INT_MAX
Definition: vtkType.h:155