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_WINDOWED_SINC_H_
00040 #define VTK_MESH_SMOOTHING_WINDOWED_SINC_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 MeshSmoothingWindowedSincVTK : public MeshProcessing
00053   {
00054     public:
00056       MeshSmoothingWindowedSincVTK ()
00057         : MeshProcessing (),
00058           num_iter_ (20),
00059           pass_band_ (0.1f),
00060           feature_edge_smoothing_ (false),
00061           feature_angle_ (45.f),
00062           edge_angle_ (15.f),
00063           boundary_smoothing_ (true),
00064           normalize_coordinates_ (false)
00065       {};
00066 
00070       inline void
00071       setNumIter (int num_iter)
00072       {
00073         num_iter_ = num_iter;
00074       };
00075 
00077       inline int
00078       getNumIter ()
00079       {
00080         return num_iter_;
00081       };
00082 
00086       inline void
00087       setPassBand (float pass_band)
00088       {
00089         pass_band_ = pass_band;
00090       };
00091 
00093       inline float
00094       getPassBand ()
00095       {
00096         return pass_band_;
00097       };
00098 
00105       inline void
00106       setNormalizeCoordinates (bool normalize_coordinates)
00107       {
00108         normalize_coordinates_ = normalize_coordinates;
00109       }
00110 
00112       inline bool
00113       getNormalizeCoordinates ()
00114       {
00115         return normalize_coordinates_;
00116       }
00117 
00121       inline void
00122       setFeatureEdgeSmoothing (bool feature_edge_smoothing)
00123       {
00124         feature_edge_smoothing_ = feature_edge_smoothing;
00125       };
00126 
00128       inline bool
00129       getFeatureEdgeSmoothing ()
00130       {
00131         return feature_edge_smoothing_;
00132       };
00133 
00137       inline void
00138       setFeatureAngle (float feature_angle)
00139       {
00140         feature_angle_ = feature_angle;
00141       };
00142 
00144       inline float
00145       getFeatureAngle ()
00146       {
00147         return feature_angle_;
00148       };
00149 
00153       inline void
00154       setEdgeAngle (float edge_angle)
00155       {
00156         edge_angle_ = edge_angle;
00157       };
00158 
00160       inline float
00161       getEdgeAngle ()
00162       {
00163         return edge_angle_;
00164       };
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 
00184     protected:
00185       void
00186       performProcessing (pcl::PolygonMesh &output);
00187 
00188     private:
00189       vtkSmartPointer<vtkPolyData> vtk_polygons_;
00190       int num_iter_;
00191       float pass_band_;
00192       bool feature_edge_smoothing_;
00193       float feature_angle_;
00194       float edge_angle_;
00195       bool boundary_smoothing_;
00196       bool normalize_coordinates_;
00197   };
00198 }
00199 #endif