41 #include <pcl/surface/processing.h>
42 #include <pcl/surface/vtk_smoothing/vtk.h>
79 convergence_ = convergence;
98 relaxation_factor_ = relaxation_factor;
105 return relaxation_factor_;
114 feature_edge_smoothing_ = feature_edge_smoothing;
121 return feature_edge_smoothing_;
130 feature_angle_ = feature_angle;
137 return feature_angle_;
146 edge_angle_ = edge_angle;
162 boundary_smoothing_ = boundary_smoothing;
169 return boundary_smoothing_;
181 float convergence_{0.0f};
182 float relaxation_factor_{0.01f};
183 bool feature_edge_smoothing_{
false};
184 float feature_angle_{45.f};
185 float edge_angle_{15.f};
186 bool boundary_smoothing_{
true};
MeshProcessing represents the base class for mesh processing algorithms.
PCL mesh smoothing based on the vtkSmoothPolyDataFilter algorithm from the VTK library.
void setConvergence(float convergence)
Specify a convergence criterion for the iteration process.
void setEdgeAngle(float edge_angle)
Specify the edge angle to control smoothing along edges (either interior or boundary).
float getConvergence() const
Get the convergence criterion.
bool getFeatureEdgeSmoothing() const
Get the status of the feature edge smoothing.
void setNumIter(int num_iter)
Set the number of iterations for the smoothing filter.
bool getBoundarySmoothing() const
Get the status of the boundary smoothing.
MeshSmoothingLaplacianVTK()=default
Empty constructor that sets the values of the algorithm parameters to the VTK defaults.
int getNumIter() const
Get the number of iterations.
void performProcessing(pcl::PolygonMesh &output) override
Abstract surface processing method.
float getFeatureAngle() const
Get the angle threshold for considering an edge to be sharp.
void setRelaxationFactor(float relaxation_factor)
Specify the relaxation factor for Laplacian smoothing.
float getEdgeAngle() const
Get the edge angle to control smoothing along edges.
void setFeatureAngle(float feature_angle)
Specify the feature angle for sharp edge identification.
float getRelaxationFactor() const
Get the relaxation factor of the Laplacian smoothing.
void setBoundarySmoothing(bool boundary_smoothing)
Turn on/off the smoothing of vertices on the boundary of the mesh.
void setFeatureEdgeSmoothing(bool feature_edge_smoothing)
Turn on/off smoothing along sharp interior edges.