iMSTK
Interactive Medical Simulation Toolkit
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
imstkSurfaceMeshSmoothen.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkGeometryAlgorithm.h"
10 
11 namespace imstk
12 {
13 class SurfaceMesh;
14 
22 {
23 public:
25  ~SurfaceMeshSmoothen() override = default;
26 
27 public:
28  imstkGetMacro(NumberOfIterations, int);
29  imstkGetMacro(RelaxationFactor, double);
30  imstkGetMacro(Convergence, double);
31  imstkGetMacro(FeatureAngle, double);
32  imstkGetMacro(EdgeAngle, double);
33  imstkGetMacro(FeatureEdgeSmoothing, bool);
34  imstkGetMacro(BoundarySmoothing, bool);
35 
39  void setInputMesh(std::shared_ptr<SurfaceMesh> inputMesh);
40 
41  imstkSetMacro(NumberOfIterations, int);
42  imstkSetMacro(RelaxationFactor, double);
43  imstkSetMacro(Convergence, double);
44  imstkSetMacro(FeatureAngle, double);
45  imstkSetMacro(EdgeAngle, double);
46  imstkSetMacro(FeatureEdgeSmoothing, bool);
47  imstkSetMacro(BoundarySmoothing, bool);
48 
49 protected:
50  void requestUpdate() override;
51 
52 private:
53  int m_NumberOfIterations = 20;
54  double m_RelaxationFactor = 0.01;
55  double m_Convergence = 0.0;
56  double m_FeatureAngle = 45.0;
57  double m_EdgeAngle = 15.0;
58  bool m_FeatureEdgeSmoothing = false;
59  bool m_BoundarySmoothing = true;
60 };
61 } // namespace imstk
void requestUpdate() override
Users can implement this for the logic to be run.
Compound Geometry.
Abstract base class for geometry algorithms. GeometryAlgorithms take N input geometries and produce N...
void setInputMesh(std::shared_ptr< SurfaceMesh > inputMesh)
Required input, port 0.
This filter smoothes the input SurfaceMesh currently only laplacian smoothing is provided.