VMTK
vtkvmtkCenterlineSmoothing.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VTK Blood Vessel Smoothing
4 Module: $RCSfile: vtkvmtkCenterlineSmoothing.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 __vtkvmtkCenterlineSmoothing_h
29 #define __vtkvmtkCenterlineSmoothing_h
30 
31 #include "vtkPolyDataAlgorithm.h"
32 //#include "vtkvmtkComputationalSmoothingWin32Header.h"
33 #include "vtkvmtkWin32Header.h"
34 
35 class vtkDoubleArray;
36 
37 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkCenterlineSmoothing : public vtkPolyDataAlgorithm
38 {
39  public:
40  vtkTypeMacro(vtkvmtkCenterlineSmoothing,vtkPolyDataAlgorithm);
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
43  static vtkvmtkCenterlineSmoothing* New();
44 
45  vtkSetMacro(SmoothingFactor,double);
46  vtkGetMacro(SmoothingFactor,double);
47 
48  vtkSetMacro(NumberOfSmoothingIterations,int);
49  vtkGetMacro(NumberOfSmoothingIterations,int);
50 
51  static void SmoothLine(vtkPoints* linePoints, vtkPoints* smoothLinePoints, int numberOfIterations = 10, double relaxation = 0.1);
52 
53  protected:
56 
57  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
58 
61 
62  private:
63  vtkvmtkCenterlineSmoothing(const vtkvmtkCenterlineSmoothing&); // Not implemented.
64  void operator=(const vtkvmtkCenterlineSmoothing&); // Not implemented.
65 };
66 
67 #endif
iteratively smooth a centerline with a laplacian kernel