Point Cloud Library (PCL)  1.7.1
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
pcl::ConcaveHull< PointInT > Class Template Reference

ConcaveHull (alpha shapes) using libqhull library. More...

#include <pcl/surface/concave_hull.h>

+ Inheritance diagram for pcl::ConcaveHull< PointInT >:

Public Types

typedef pcl::PointCloud< PointInT > PointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
- Public Types inherited from pcl::MeshConstruction< PointInT >
typedef boost::shared_ptr
< MeshConstruction< PointInT > > 
Ptr
 
typedef boost::shared_ptr
< const MeshConstruction
< PointInT > > 
ConstPtr
 
- Public Types inherited from pcl::PCLSurfaceBase< PointInT >
typedef boost::shared_ptr
< PCLSurfaceBase< PointInT > > 
Ptr
 
typedef boost::shared_ptr
< const PCLSurfaceBase
< PointInT > > 
ConstPtr
 
typedef pcl::search::Search
< PointInT > 
KdTree
 
typedef pcl::search::Search
< PointInT >::Ptr 
KdTreePtr
 
- Public Types inherited from pcl::PCLBase< PointInT >
typedef pcl::PointCloud< PointInT > PointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef boost::shared_ptr
< PointIndices
PointIndicesPtr
 
typedef boost::shared_ptr
< PointIndices const > 
PointIndicesConstPtr
 

Public Member Functions

 ConcaveHull ()
 Empty constructor. More...
 
virtual ~ConcaveHull ()
 Empty destructor. More...
 
void reconstruct (PointCloud &points, std::vector< pcl::Vertices > &polygons)
 Compute a concave hull for all points given. More...
 
void reconstruct (PointCloud &output)
 Compute a concave hull for all points given. More...
 
void setAlpha (double alpha)
 Set the alpha value, which limits the size of the resultant hull segments (the smaller the more detailed the hull). More...
 
double getAlpha ()
 Returns the alpha parameter, see setAlpha(). More...
 
void setVoronoiCenters (PointCloudPtr voronoi_centers)
 If set, the voronoi cells center will be saved in voronoi_centers More...
 
void setKeepInformation (bool value)
 If keep_information_is set to true the convex hull points keep other information like rgb, normals, ... More...
 
 PCL_DEPRECATED (int getDim() const,"[pcl::ConcaveHull::getDim] This method is deprecated. Please use getDimension () instead.")
 Returns the dimensionality (2 or 3) of the calculated hull. More...
 
int getDimension () const
 Returns the dimensionality (2 or 3) of the calculated hull. More...
 
void setDimension (int dimension)
 Sets the dimension on the input data, 2D or 3D. More...
 
- Public Member Functions inherited from pcl::MeshConstruction< PointInT >
 MeshConstruction ()
 Constructor. More...
 
virtual ~MeshConstruction ()
 Destructor. More...
 
virtual void reconstruct (pcl::PolygonMesh &output)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> More...
 
virtual void reconstruct (std::vector< pcl::Vertices > &polygons)
 Base method for mesh construction for all points given in <setInputCloud (), setIndices ()> More...
 
- Public Member Functions inherited from pcl::PCLSurfaceBase< PointInT >
 PCLSurfaceBase ()
 Empty constructor. More...
 
virtual ~PCLSurfaceBase ()
 Empty destructor. More...
 
void setSearchMethod (const KdTreePtr &tree)
 Provide an optional pointer to a search object. More...
 
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used. More...
 
- Public Member Functions inherited from pcl::PCLBase< PointInT >
 PCLBase ()
 Empty constructor. More...
 
 PCLBase (const PCLBase &base)
 Copy constructor. More...
 
virtual ~PCLBase ()
 Destructor. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset. More...
 
virtual void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used. More...
 
const PointInT & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code. More...
 

Protected Types

typedef boost::shared_ptr
< ConcaveHull< PointInT > > 
Ptr
 
typedef boost::shared_ptr
< const ConcaveHull< PointInT > > 
ConstPtr
 

Protected Member Functions

std::string getClassName () const
 Class get name method. More...
 
void performReconstruction (PointCloud &points, std::vector< pcl::Vertices > &polygons)
 The actual reconstruction method. More...
 
virtual void performReconstruction (PolygonMesh &output)
 Abstract surface reconstruction method. More...
 
virtual void performReconstruction (std::vector< pcl::Vertices > &polygons)
 Abstract surface reconstruction method. More...
 

Protected Attributes

double alpha_
 The method accepts facets only if the distance from any vertex to the facet->center (center of the voronoi cell) is smaller than alpha. More...
 
bool keep_information_
 If set to true, the reconstructed point cloud describing the hull is obtained from the original input cloud by performing a nearest neighbor search from Qhull output. More...
 
PointCloudPtr voronoi_centers_
 the centers of the voronoi cells More...
 
int dim_
 the dimensionality of the concave hull More...
 
- Protected Attributes inherited from pcl::MeshConstruction< PointInT >
bool check_tree_
 A flag specifying whether or not the derived reconstruction algorithm needs the search object tree. More...
 
- Protected Attributes inherited from pcl::PCLSurfaceBase< PointInT >
KdTreePtr tree_
 A pointer to the spatial search object. More...
 
- Protected Attributes inherited from pcl::PCLBase< PointInT >
PointCloudConstPtr input_
 The input point cloud dataset. More...
 
IndicesPtr indices_
 A pointer to the vector of point indices to use. More...
 
bool use_indices_
 Set to true if point indices are used. More...
 
bool fake_indices_
 If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...
 

Detailed Description

template<typename PointInT>
class pcl::ConcaveHull< PointInT >

ConcaveHull (alpha shapes) using libqhull library.

Author
Aitor Aldoma

Definition at line 56 of file concave_hull.h.

Member Typedef Documentation

template<typename PointInT>
typedef boost::shared_ptr<const ConcaveHull<PointInT> > pcl::ConcaveHull< PointInT >::ConstPtr
protected

Definition at line 60 of file concave_hull.h.

template<typename PointInT>
typedef pcl::PointCloud<PointInT> pcl::ConcaveHull< PointInT >::PointCloud

Definition at line 70 of file concave_hull.h.

template<typename PointInT>
typedef PointCloud::ConstPtr pcl::ConcaveHull< PointInT >::PointCloudConstPtr

Definition at line 72 of file concave_hull.h.

template<typename PointInT>
typedef PointCloud::Ptr pcl::ConcaveHull< PointInT >::PointCloudPtr

Definition at line 71 of file concave_hull.h.

template<typename PointInT>
typedef boost::shared_ptr<ConcaveHull<PointInT> > pcl::ConcaveHull< PointInT >::Ptr
protected

Definition at line 59 of file concave_hull.h.

Constructor & Destructor Documentation

template<typename PointInT>
pcl::ConcaveHull< PointInT >::ConcaveHull ( )
inline

Empty constructor.

Definition at line 75 of file concave_hull.h.

template<typename PointInT>
virtual pcl::ConcaveHull< PointInT >::~ConcaveHull ( )
inlinevirtual

Empty destructor.

Definition at line 80 of file concave_hull.h.

Member Function Documentation

template<typename PointInT>
double pcl::ConcaveHull< PointInT >::getAlpha ( )
inline

Returns the alpha parameter, see setAlpha().

Definition at line 112 of file concave_hull.h.

References pcl::ConcaveHull< PointInT >::alpha_.

template<typename PointInT>
std::string pcl::ConcaveHull< PointInT >::getClassName ( ) const
inlineprotectedvirtual

Class get name method.

Reimplemented from pcl::PCLSurfaceBase< PointInT >.

Definition at line 161 of file concave_hull.h.

Referenced by pcl::ConcaveHull< PointInT >::setDimension().

template<typename PointInT>
int pcl::ConcaveHull< PointInT >::getDimension ( ) const
inline

Returns the dimensionality (2 or 3) of the calculated hull.

Definition at line 141 of file concave_hull.h.

References pcl::ConcaveHull< PointInT >::dim_.

template<typename PointInT>
pcl::ConcaveHull< PointInT >::PCL_DEPRECATED ( int getDim()  const,
" This method is deprecated. Please use getDimension () instead."  [pcl::ConcaveHull::getDim] 
)

Returns the dimensionality (2 or 3) of the calculated hull.

template<typename PointInT >
void pcl::ConcaveHull< PointInT >::performReconstruction ( PointCloud points,
std::vector< pcl::Vertices > &  polygons 
)
protected
template<typename PointInT >
void pcl::ConcaveHull< PointInT >::performReconstruction ( PolygonMesh output)
protectedvirtual

Abstract surface reconstruction method.

Parameters
[out]outputthe output polygonal mesh

Implements pcl::MeshConstruction< PointInT >.

Definition at line 602 of file concave_hull.hpp.

References pcl::PolygonMesh::cloud, pcl::PolygonMesh::polygons, and pcl::toPCLPointCloud2().

template<typename PointInT >
void pcl::ConcaveHull< PointInT >::performReconstruction ( std::vector< pcl::Vertices > &  polygons)
protectedvirtual

Abstract surface reconstruction method.

Parameters
[out]polygonsthe resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.

Implements pcl::MeshConstruction< PointInT >.

Definition at line 614 of file concave_hull.hpp.

template<typename PointInT >
void pcl::ConcaveHull< PointInT >::reconstruct ( PointCloud points,
std::vector< pcl::Vertices > &  polygons 
)

Compute a concave hull for all points given.

Parameters
pointsthe resultant points lying on the concave hull
polygonsthe resultant concave hull polygons, as a set of vertices. The Vertices structure contains an array of point indices.

Definition at line 99 of file concave_hull.hpp.

References pcl::PointCloud< T >::header, pcl::PointCloud< T >::height, pcl::PointCloud< T >::is_dense, pcl::PointCloud< T >::points, and pcl::PointCloud< T >::width.

template<typename PointInT >
void pcl::ConcaveHull< PointInT >::reconstruct ( PointCloud output)

Compute a concave hull for all points given.

Parameters
outputthe resultant concave hull vertices

Definition at line 70 of file concave_hull.hpp.

References pcl::PointCloud< T >::header, pcl::PointCloud< T >::height, pcl::PointCloud< T >::is_dense, pcl::PointCloud< T >::points, and pcl::PointCloud< T >::width.

template<typename PointInT>
void pcl::ConcaveHull< PointInT >::setAlpha ( double  alpha)
inline

Set the alpha value, which limits the size of the resultant hull segments (the smaller the more detailed the hull).

Parameters
alphapositive, non-zero value, defining the maximum length from a vertex to the facet center (center of the voronoi cell).

Definition at line 105 of file concave_hull.h.

References pcl::ConcaveHull< PointInT >::alpha_.

template<typename PointInT>
void pcl::ConcaveHull< PointInT >::setDimension ( int  dimension)
inline

Sets the dimension on the input data, 2D or 3D.

Parameters
[in]dimensionThe dimension of the input data. If not set, this will be determined automatically.

Definition at line 150 of file concave_hull.h.

References pcl::ConcaveHull< PointInT >::dim_, and pcl::ConcaveHull< PointInT >::getClassName().

template<typename PointInT>
void pcl::ConcaveHull< PointInT >::setKeepInformation ( bool  value)
inline

If keep_information_is set to true the convex hull points keep other information like rgb, normals, ...

Parameters
valuewhere to keep the information or not, default is false

Definition at line 131 of file concave_hull.h.

References pcl::ConcaveHull< PointInT >::keep_information_.

template<typename PointInT>
void pcl::ConcaveHull< PointInT >::setVoronoiCenters ( PointCloudPtr  voronoi_centers)
inline

If set, the voronoi cells center will be saved in voronoi_centers

Parameters
voronoi_centers

Definition at line 121 of file concave_hull.h.

References pcl::ConcaveHull< PointInT >::voronoi_centers_.

Member Data Documentation

template<typename PointInT>
double pcl::ConcaveHull< PointInT >::alpha_
protected

The method accepts facets only if the distance from any vertex to the facet->center (center of the voronoi cell) is smaller than alpha.

Definition at line 186 of file concave_hull.h.

Referenced by pcl::ConcaveHull< PointInT >::getAlpha(), and pcl::ConcaveHull< PointInT >::setAlpha().

template<typename PointInT>
int pcl::ConcaveHull< PointInT >::dim_
protected

the dimensionality of the concave hull

Definition at line 197 of file concave_hull.h.

Referenced by pcl::ConcaveHull< PointInT >::getDimension(), and pcl::ConcaveHull< PointInT >::setDimension().

template<typename PointInT>
bool pcl::ConcaveHull< PointInT >::keep_information_
protected

If set to true, the reconstructed point cloud describing the hull is obtained from the original input cloud by performing a nearest neighbor search from Qhull output.

Definition at line 191 of file concave_hull.h.

Referenced by pcl::ConcaveHull< PointInT >::setKeepInformation().

template<typename PointInT>
PointCloudPtr pcl::ConcaveHull< PointInT >::voronoi_centers_
protected

the centers of the voronoi cells

Definition at line 194 of file concave_hull.h.

Referenced by pcl::ConcaveHull< PointInT >::setVoronoiCenters().


The documentation for this class was generated from the following files: