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
00040 #include <pcl/pcl_config.h>
00041 #ifdef HAVE_QHULL
00042
00043 #ifndef PCL_CONCAVE_HULL_H
00044 #define PCL_CONCAVE_HULL_H
00045
00046 #include <pcl/surface/convex_hull.h>
00047
00048 namespace pcl
00049 {
00051
00055 template<typename PointInT>
00056 class ConcaveHull : public MeshConstruction<PointInT>
00057 {
00058 protected:
00059 using PCLBase<PointInT>::input_;
00060 using PCLBase<PointInT>::indices_;
00061 using PCLBase<PointInT>::initCompute;
00062 using PCLBase<PointInT>::deinitCompute;
00063
00064 public:
00065 using MeshConstruction<PointInT>::reconstruct;
00066
00067 typedef pcl::PointCloud<PointInT> PointCloud;
00068 typedef typename PointCloud::Ptr PointCloudPtr;
00069 typedef typename PointCloud::ConstPtr PointCloudConstPtr;
00070
00072 ConcaveHull () : alpha_ (0), keep_information_ (false), voronoi_centers_ (), dim_(0)
00073 {
00074 };
00075
00082 void
00083 reconstruct (PointCloud &points,
00084 std::vector<pcl::Vertices> &polygons);
00085
00089 void
00090 reconstruct (PointCloud &output);
00091
00098 inline void
00099 setAlpha (double alpha)
00100 {
00101 alpha_ = alpha;
00102 }
00103
00105 inline double
00106 getAlpha ()
00107 {
00108 return (alpha_);
00109 }
00110
00114 inline void
00115 setVoronoiCenters (PointCloudPtr voronoi_centers)
00116 {
00117 voronoi_centers_ = voronoi_centers;
00118 }
00119
00124 void
00125 setKeepInformation (bool value)
00126 {
00127 keep_information_ = value;
00128 }
00129
00131 inline int
00132 getDim () const
00133 {
00134 return dim_;
00135 }
00136
00138 inline int
00139 getDimension () const
00140 {
00141 return dim_;
00142 }
00143
00147 void
00148 setDimension (int dimension)
00149 {
00150 if ((dimension == 2) || (dimension == 3))
00151 dim_ = dimension;
00152 else
00153 PCL_ERROR ("[pcl::%s::setDimension] Invalid input dimension specified!\n", getClassName ().c_str ());
00154 }
00155
00156 protected:
00158 std::string
00159 getClassName () const
00160 {
00161 return ("ConcaveHull");
00162 }
00163
00164 protected:
00171 void
00172 performReconstruction (PointCloud &points,
00173 std::vector<pcl::Vertices> &polygons);
00174
00175 virtual void
00176 performReconstruction (PolygonMesh &output);
00177
00178 virtual void
00179 performReconstruction (std::vector<pcl::Vertices> &polygons);
00180
00184 double alpha_;
00185
00189 bool keep_information_;
00190
00192 PointCloudPtr voronoi_centers_;
00193
00195 int dim_;
00196 };
00197 }
00198
00199 #endif //#ifndef PCL_CONCAVE_HULL
00200 #endif