VMTK
vtkvmtkPolyDataClampedSmoothingFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: VMTK
4  Module: $RCSfile: vtkvmtkPolyDataClampedSmoothingFilter.h,v $
5  Language: C++
6 
7  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
8  See LICENSE file for details.
9 
10  Portions of this code are covered under the VTK copyright.
11  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
12  for details.
13 
14  This software is distributed WITHOUT ANY WARRANTY; without even
15  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  PURPOSE. See the above copyright notices for more information.
17 
18 =========================================================================*/
28 #ifndef __vtkvmtkPolyDataClampedSmoothingFilter_h
29 #define __vtkvmtkPolyDataClampedSmoothingFilter_h
30 
31 #include "vtkObject.h"
32 #include "vtkPolyDataAlgorithm.h"
33 #include "vtkvmtkWin32Header.h"
34 
35 class VTK_VMTK_DIFFERENTIAL_GEOMETRY_EXPORT vtkvmtkPolyDataClampedSmoothingFilter : public vtkPolyDataAlgorithm
36 {
37 public:
38 
40  vtkTypeMacro(vtkvmtkPolyDataClampedSmoothingFilter,vtkPolyDataAlgorithm);
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
43  vtkSetMacro(SmoothingType,int);
44  vtkGetMacro(SmoothingType,int);
46  { this->SmoothingType = LAPLACIAN; }
48  { this->SmoothingType = CURVATURE_DIFFUSION; }
49 
50  vtkSetMacro(NumberOfIterations,int);
51  vtkGetMacro(NumberOfIterations,int);
52 
53  vtkSetMacro(Clamp,int);
54  vtkGetMacro(Clamp,int);
55  vtkBooleanMacro(Clamp,int);
56 
57  vtkSetMacro(ClampThreshold,double);
58  vtkGetMacro(ClampThreshold,double);
59 
60  vtkSetStringMacro(ClampArrayName);
61  vtkGetStringMacro(ClampArrayName);
62 
63  vtkSetMacro(TimeStepFactor,double);
64  vtkGetMacro(TimeStepFactor,double);
65 
66 //BTX
67  enum {
69  CURVATURE_DIFFUSION
70  };
71 //ETX
72 
73 protected:
76 
77  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
78  void LaplacianIteration(vtkPolyData* surface);
79  void CurvatureDiffusionIteration(vtkPolyData* surface);
80  double ComputeTimeStep(vtkPolyData* surface);
81 
84  int Clamp;
87 
89 
90 private:
92  void operator=(const vtkvmtkPolyDataClampedSmoothingFilter&); // Not implemented.
93 };
94 
95 #endif
96 
Apply a laplacian or curvature based smoothing filter to a surface with particular points fixed in pl...