Point Cloud Library (PCL)
1.7.0
|
ConvexHull using libqhull library. More...
#include <pcl/surface/convex_hull.h>
Public Types | |
typedef boost::shared_ptr < ConvexHull< PointInT > > | Ptr |
typedef boost::shared_ptr < const ConvexHull< PointInT > > | ConstPtr |
typedef pcl::PointCloud< PointInT > | PointCloud |
typedef PointCloud::Ptr | PointCloudPtr |
typedef PointCloud::ConstPtr | PointCloudConstPtr |
Public Member Functions | |
ConvexHull () | |
Empty constructor. | |
virtual | ~ConvexHull () |
Empty destructor. | |
void | reconstruct (PointCloud &points, std::vector< pcl::Vertices > &polygons) |
Compute a convex hull for all points given. | |
void | reconstruct (PointCloud &points) |
Compute a convex hull for all points given. | |
void | setComputeAreaVolume (bool value) |
If set to true, the qhull library is called to compute the total area and volume of the convex hull. | |
double | getTotalArea () const |
Returns the total area of the convex hull. | |
double | getTotalVolume () const |
Returns the total volume of the convex hull. | |
void | setDimension (int dimension) |
Sets the dimension on the input data, 2D or 3D. | |
int | getDimension () const |
Returns the dimensionality (2 or 3) of the calculated hull. | |
Protected Member Functions | |
void | performReconstruction (PointCloud &points, std::vector< pcl::Vertices > &polygons, bool fill_polygon_data=false) |
The actual reconstruction method. | |
void | performReconstruction2D (PointCloud &points, std::vector< pcl::Vertices > &polygons, bool fill_polygon_data=false) |
The reconstruction method for 2D data. | |
void | performReconstruction3D (PointCloud &points, std::vector< pcl::Vertices > &polygons, bool fill_polygon_data=false) |
The reconstruction method for 3D data. | |
virtual void | performReconstruction (PolygonMesh &output) |
A reconstruction method that returns a polygonmesh. | |
virtual void | performReconstruction (std::vector< pcl::Vertices > &polygons) |
A reconstruction method that returns the polygon of the convex hull. | |
void | calculateInputDimension () |
Automatically determines the dimension of input data - 2D or 3D. | |
std::string | getClassName () const |
Class get name method. | |
Protected Attributes | |
bool | compute_area_ |
double | total_area_ |
double | total_volume_ |
int | dimension_ |
The dimensionality of the concave hull (2D or 3D). | |
double | projection_angle_thresh_ |
How close can a 2D plane's normal be to an axis to make projection problematic. | |
std::string | qhull_flags |
Option flag string to be used calling qhull. | |
const Eigen::Vector3d | x_axis_ |
const Eigen::Vector3d | y_axis_ |
const Eigen::Vector3d | z_axis_ |
ConvexHull using libqhull library.
Definition at line 72 of file convex_hull.h.
typedef boost::shared_ptr<const ConvexHull<PointInT> > pcl::ConvexHull< PointInT >::ConstPtr |
Reimplemented from pcl::MeshConstruction< PointInT >.
Definition at line 82 of file convex_hull.h.
typedef pcl::PointCloud<PointInT> pcl::ConvexHull< PointInT >::PointCloud |
Reimplemented from pcl::PCLBase< PointInT >.
Definition at line 86 of file convex_hull.h.
typedef PointCloud::ConstPtr pcl::ConvexHull< PointInT >::PointCloudConstPtr |
Reimplemented from pcl::PCLBase< PointInT >.
Definition at line 88 of file convex_hull.h.
typedef PointCloud::Ptr pcl::ConvexHull< PointInT >::PointCloudPtr |
Reimplemented from pcl::PCLBase< PointInT >.
Definition at line 87 of file convex_hull.h.
typedef boost::shared_ptr<ConvexHull<PointInT> > pcl::ConvexHull< PointInT >::Ptr |
Reimplemented from pcl::MeshConstruction< PointInT >.
Definition at line 81 of file convex_hull.h.
pcl::ConvexHull< PointInT >::ConvexHull | ( | ) | [inline] |
Empty constructor.
Definition at line 91 of file convex_hull.h.
virtual pcl::ConvexHull< PointInT >::~ConvexHull | ( | ) | [inline, virtual] |
Empty destructor.
Definition at line 98 of file convex_hull.h.
void pcl::ConvexHull< PointInT >::calculateInputDimension | ( | ) | [protected] |
Automatically determines the dimension of input data - 2D or 3D.
Definition at line 57 of file convex_hull.hpp.
References pcl::computeMeanAndCovarianceMatrix(), pcl::eigen33(), and pcl::EIGEN_ALIGN16.
std::string pcl::ConvexHull< PointInT >::getClassName | ( | ) | const [inline, protected, virtual] |
Class get name method.
Reimplemented from pcl::PCLSurfaceBase< PointInT >.
Definition at line 226 of file convex_hull.h.
Referenced by pcl::ConvexHull< PointInT >::setDimension().
int pcl::ConvexHull< PointInT >::getDimension | ( | ) | const [inline] |
Returns the dimensionality (2 or 3) of the calculated hull.
Definition at line 164 of file convex_hull.h.
References pcl::ConvexHull< PointInT >::dimension_.
double pcl::ConvexHull< PointInT >::getTotalArea | ( | ) | const [inline] |
Returns the total area of the convex hull.
Definition at line 136 of file convex_hull.h.
References pcl::ConvexHull< PointInT >::total_area_.
double pcl::ConvexHull< PointInT >::getTotalVolume | ( | ) | const [inline] |
Returns the total volume of the convex hull.
Only valid for 3-dimensional sets. For 2D-sets volume is zero.
Definition at line 145 of file convex_hull.h.
References pcl::ConvexHull< PointInT >::total_volume_.
void pcl::ConvexHull< PointInT >::performReconstruction | ( | PointCloud & | points, |
std::vector< pcl::Vertices > & | polygons, | ||
bool | fill_polygon_data = false |
||
) | [protected] |
The actual reconstruction method.
[out] | points | the resultant points lying on the convex hull |
[out] | polygons | the resultant convex hull polygons, as a set of vertices. The Vertices structure contains an array of point indices. |
[in] | fill_polygon_data | true if polygons should be filled, false otherwise |
Definition at line 408 of file convex_hull.hpp.
void pcl::ConvexHull< PointInT >::performReconstruction | ( | PolygonMesh & | output | ) | [protected, virtual] |
A reconstruction method that returns a polygonmesh.
[out] | output | a PolygonMesh representing the convex hull of the input data. |
Implements pcl::MeshConstruction< PointInT >.
Definition at line 446 of file convex_hull.hpp.
References pcl::PolygonMesh::cloud, pcl::PolygonMesh::polygons, and pcl::toPCLPointCloud2().
void pcl::ConvexHull< PointInT >::performReconstruction | ( | std::vector< pcl::Vertices > & | polygons | ) | [protected, virtual] |
A reconstruction method that returns the polygon of the convex hull.
[out] | polygons | the polygon(s) representing the convex hull of the input data. |
Implements pcl::MeshConstruction< PointInT >.
Definition at line 458 of file convex_hull.hpp.
void pcl::ConvexHull< PointInT >::performReconstruction2D | ( | PointCloud & | points, |
std::vector< pcl::Vertices > & | polygons, | ||
bool | fill_polygon_data = false |
||
) | [protected] |
The reconstruction method for 2D data.
Does not require dimension to be set.
[out] | points | the resultant points lying on the convex hull |
[out] | polygons | the resultant convex hull polygons, as a set of vertices. The Vertices structure contains an array of point indices. |
[in] | fill_polygon_data | true if polygons should be filled, false otherwise |
Definition at line 75 of file convex_hull.hpp.
References pcl::comparePoints2D(), pcl::compute3DCentroid(), pcl::computeMeanAndCovarianceMatrix(), pcl::eigen33(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.
void pcl::ConvexHull< PointInT >::performReconstruction3D | ( | PointCloud & | points, |
std::vector< pcl::Vertices > & | polygons, | ||
bool | fill_polygon_data = false |
||
) | [protected] |
The reconstruction method for 3D data.
Does not require dimension to be set.
[out] | points | the resultant points lying on the convex hull |
[out] | polygons | the resultant convex hull polygons, as a set of vertices. The Vertices structure contains an array of point indices. |
[in] | fill_polygon_data | true if polygons should be filled, false otherwise |
Definition at line 284 of file convex_hull.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.
void pcl::ConvexHull< PointInT >::reconstruct | ( | PointCloud & | points, |
std::vector< pcl::Vertices > & | polygons | ||
) |
Compute a convex hull for all points given.
[out] | points | the resultant points lying on the convex hull. |
[out] | polygons | the resultant convex hull polygons, as a set of vertices. The Vertices structure contains an array of point indices. |
Definition at line 466 of file convex_hull.hpp.
References pcl::PointCloud< PointT >::header, pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.
void pcl::ConvexHull< PointInT >::reconstruct | ( | PointCloud & | points | ) |
Compute a convex hull for all points given.
[out] | points | the resultant points lying on the convex hull. |
Definition at line 423 of file convex_hull.hpp.
References pcl::PointCloud< PointT >::header, pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.
void pcl::ConvexHull< PointInT >::setComputeAreaVolume | ( | bool | value | ) | [inline] |
If set to true, the qhull library is called to compute the total area and volume of the convex hull.
NOTE: When this option is activated, the qhull library produces output to the console.
[in] | value | wheter to compute the area and the volume, default is false |
Definition at line 125 of file convex_hull.h.
References pcl::ConvexHull< PointInT >::compute_area_, and pcl::ConvexHull< PointInT >::qhull_flags.
void pcl::ConvexHull< PointInT >::setDimension | ( | int | dimension | ) | [inline] |
Sets the dimension on the input data, 2D or 3D.
[in] | dimension | The dimension of the input data. If not set, this will be determined automatically. |
Definition at line 154 of file convex_hull.h.
References pcl::ConvexHull< PointInT >::dimension_, and pcl::ConvexHull< PointInT >::getClassName().
bool pcl::ConvexHull< PointInT >::compute_area_ [protected] |
Definition at line 232 of file convex_hull.h.
Referenced by pcl::ConvexHull< PointInT >::setComputeAreaVolume().
int pcl::ConvexHull< PointInT >::dimension_ [protected] |
The dimensionality of the concave hull (2D or 3D).
Definition at line 241 of file convex_hull.h.
Referenced by pcl::ConvexHull< PointInT >::getDimension(), and pcl::ConvexHull< PointInT >::setDimension().
double pcl::ConvexHull< PointInT >::projection_angle_thresh_ [protected] |
How close can a 2D plane's normal be to an axis to make projection problematic.
Definition at line 244 of file convex_hull.h.
std::string pcl::ConvexHull< PointInT >::qhull_flags [protected] |
Option flag string to be used calling qhull.
Definition at line 247 of file convex_hull.h.
Referenced by pcl::ConvexHull< PointInT >::setComputeAreaVolume().
double pcl::ConvexHull< PointInT >::total_area_ [protected] |
Definition at line 235 of file convex_hull.h.
Referenced by pcl::ConvexHull< PointInT >::getTotalArea().
double pcl::ConvexHull< PointInT >::total_volume_ [protected] |
Definition at line 238 of file convex_hull.h.
Referenced by pcl::ConvexHull< PointInT >::getTotalVolume().
const Eigen::Vector3d pcl::ConvexHull< PointInT >::x_axis_ [protected] |
Definition at line 250 of file convex_hull.h.
const Eigen::Vector3d pcl::ConvexHull< PointInT >::y_axis_ [protected] |
Definition at line 253 of file convex_hull.h.
const Eigen::Vector3d pcl::ConvexHull< PointInT >::z_axis_ [protected] |
Definition at line 256 of file convex_hull.h.