VTK  9.1.0
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=========================================================================*/
95#ifndef vtkPointSmoothingFilter_h
96#define vtkPointSmoothingFilter_h
97
98#include "vtkFiltersPointsModule.h" // For export macro
100
102class vtkDataArray;
103class vtkPlane;
104
105class VTKFILTERSPOINTS_EXPORT vtkPointSmoothingFilter : public vtkPointSetAlgorithm
106{
107public:
109
115 void PrintSelf(ostream& os, vtkIndent indent) override;
117
119
123 vtkSetClampMacro(NeighborhoodSize, int, 4, 128);
124 vtkGetMacro(NeighborhoodSize, int);
126
130 enum
131 {
132 DEFAULT_SMOOTHING = 0,
137 FRAME_FIELD_SMOOTHING
138 };
139
141
151 vtkSetClampMacro(SmoothingMode, int, DEFAULT_SMOOTHING, FRAME_FIELD_SMOOTHING);
152 vtkGetMacro(SmoothingMode, int);
153 void SetSmoothingModeToDefault() { this->SetSmoothingMode(DEFAULT_SMOOTHING); }
154 void SetSmoothingModeToGeometric() { this->SetSmoothingMode(GEOMETRIC_SMOOTHING); }
155 void SetSmoothingModeToUniform() { this->SetSmoothingMode(UNIFORM_SMOOTHING); }
156 void SetSmoothingModeToScalars() { this->SetSmoothingMode(SCALAR_SMOOTHING); }
157 void SetSmoothingModeToTensors() { this->SetSmoothingMode(TENSOR_SMOOTHING); }
158 void SetSmoothingModeToFrameField() { this->SetSmoothingMode(FRAME_FIELD_SMOOTHING); }
160
162
167 vtkGetObjectMacro(FrameFieldArray, vtkDataArray);
169
171
174 vtkSetClampMacro(NumberOfIterations, int, 0, VTK_INT_MAX);
175 vtkGetMacro(NumberOfIterations, int);
177
179
183 vtkSetClampMacro(NumberOfSubIterations, int, 1, VTK_INT_MAX);
184 vtkGetMacro(NumberOfSubIterations, int);
186
188
196 vtkSetClampMacro(MaximumStepSize, double, 0.0, VTK_DOUBLE_MAX);
197 vtkGetMacro(MaximumStepSize, double);
199
201
205 vtkSetClampMacro(Convergence, double, 0.0, 1.0);
206 vtkGetMacro(Convergence, double);
208
210
222 vtkSetMacro(EnableConstraints, bool);
223 vtkGetMacro(EnableConstraints, bool);
224 vtkBooleanMacro(EnableConstraints, bool);
225 vtkSetClampMacro(FixedAngle, double, 0, 90);
226 vtkGetMacro(FixedAngle, double);
227 vtkSetClampMacro(BoundaryAngle, double, 0, 120);
228 vtkGetMacro(BoundaryAngle, double);
230
232
236 vtkSetMacro(GenerateConstraintScalars, bool);
237 vtkGetMacro(GenerateConstraintScalars, bool);
238 vtkBooleanMacro(GenerateConstraintScalars, bool);
240
242
246 vtkSetMacro(GenerateConstraintNormals, bool);
247 vtkGetMacro(GenerateConstraintNormals, bool);
248 vtkBooleanMacro(GenerateConstraintNormals, bool);
250
252
258 vtkSetMacro(ComputePackingRadius, bool);
259 vtkGetMacro(ComputePackingRadius, bool);
260 vtkBooleanMacro(ComputePackingRadius, bool);
262
264
274 vtkSetClampMacro(PackingRadius, double, 0.0, VTK_DOUBLE_MAX);
275 vtkGetMacro(PackingRadius, double);
277
279
288 vtkSetClampMacro(PackingFactor, double, 0.1, 10.0);
289 vtkGetMacro(PackingFactor, double);
291
293
300 vtkSetClampMacro(AttractionFactor, double, 0.1, 10.0);
301 vtkGetMacro(AttractionFactor, double);
303
307 enum
308 {
309 UNCONSTRAINED_MOTION = 0,
310 PLANE_MOTION
311 };
312
314
319 vtkSetMacro(MotionConstraint, int);
320 vtkGetMacro(MotionConstraint, int);
321 void SetMotionConstraintToUnconstrained() { this->SetMotionConstraint(UNCONSTRAINED_MOTION); }
322 void SetMotionConstraintToPlane() { this->SetMotionConstraint(PLANE_MOTION); }
324
326
331 vtkGetObjectMacro(Plane, vtkPlane);
333
335
341 vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
343
344protected:
347
348 // Control the smoothing
356
357 // Support the algorithm
359
360 // Constraints
366
367 // Packing radius and related
372
373 // Motion constraints
376
377 // Pipeline support
379 int FillInputPortInformation(int port, vtkInformation* info) override;
380
381private:
383 void operator=(const vtkPointSmoothingFilter&) = delete;
384};
385
386#endif
abstract class to quickly locate points in 3-space
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
perform various plane computations
Definition: vtkPlane.h:143
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