Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef VTK_MESH_SMOOTHING_LAPLACIAN_H_
00040 #define VTK_MESH_SMOOTHING_LAPLACIAN_H_
00041
00042 #include <pcl/surface/processing.h>
00043 #include <pcl/surface/vtk_smoothing/vtk.h>
00044
00045 namespace pcl
00046 {
00052 class PCL_EXPORTS MeshSmoothingLaplacianVTK : public MeshProcessing
00053 {
00054 public:
00056 MeshSmoothingLaplacianVTK ()
00057 : MeshProcessing ()
00058 , vtk_polygons_ ()
00059 , num_iter_ (20)
00060 , convergence_ (0.0f)
00061 , relaxation_factor_ (0.01f)
00062 , feature_edge_smoothing_ (false)
00063 , feature_angle_ (45.f)
00064 , edge_angle_ (15.f)
00065 , boundary_smoothing_ (true)
00066 {};
00067
00071 inline void
00072 setNumIter (int num_iter)
00073 {
00074 num_iter_ = num_iter;
00075 };
00076
00078 inline int
00079 getNumIter ()
00080 {
00081 return num_iter_;
00082 };
00083
00087 inline void
00088 setConvergence (float convergence)
00089 {
00090 convergence_ = convergence;
00091 };
00092
00094 inline float
00095 getConvergence ()
00096 {
00097 return convergence_;
00098 };
00099
00106 inline void
00107 setRelaxationFactor (float relaxation_factor)
00108 {
00109 relaxation_factor_ = relaxation_factor;
00110 };
00111
00113 inline float
00114 getRelaxationFactor ()
00115 {
00116 return relaxation_factor_;
00117 };
00118
00122 inline void
00123 setFeatureEdgeSmoothing (bool feature_edge_smoothing)
00124 {
00125 feature_edge_smoothing_ = feature_edge_smoothing;
00126 };
00127
00129 inline bool
00130 getFeatureEdgeSmoothing ()
00131 {
00132 return feature_edge_smoothing_;
00133 };
00134
00138 inline void
00139 setFeatureAngle (float feature_angle)
00140 {
00141 feature_angle_ = feature_angle;
00142 };
00143
00145 inline float
00146 getFeatureAngle ()
00147 {
00148 return feature_angle_;
00149 };
00150
00154 inline void
00155 setEdgeAngle (float edge_angle)
00156 {
00157 edge_angle_ = edge_angle;
00158 };
00159
00161 inline float
00162 getEdgeAngle ()
00163 {
00164 return edge_angle_;
00165 };
00166
00170 inline void
00171 setBoundarySmoothing (bool boundary_smoothing)
00172 {
00173 boundary_smoothing_ = boundary_smoothing;
00174 };
00175
00177 inline bool
00178 getBoundarySmoothing ()
00179 {
00180 return boundary_smoothing_;
00181 }
00182
00183 protected:
00184 void
00185 performProcessing (pcl::PolygonMesh &output);
00186
00187 private:
00188 vtkSmartPointer<vtkPolyData> vtk_polygons_;
00189
00191 int num_iter_;
00192 float convergence_;
00193 float relaxation_factor_;
00194 bool feature_edge_smoothing_;
00195 float feature_angle_;
00196 float edge_angle_;
00197 bool boundary_smoothing_;
00198 };
00199 }
00200 #endif