|
Point Cloud Library (PCL)
1.4.0
|
PointCloud represents the base class in PCL for storing collections of 3D points. More...
#include <pcl/point_cloud.h>

Public Types | |
| typedef PointT | PointType |
| typedef std::vector< PointT, Eigen::aligned_allocator < PointT > > | VectorType |
| typedef boost::shared_ptr < PointCloud< PointT > > | Ptr |
| typedef boost::shared_ptr < const PointCloud< PointT > > | ConstPtr |
| typedef VectorType::iterator | iterator |
| typedef VectorType::const_iterator | const_iterator |
Public Member Functions | |
| PointCloud () | |
| Default constructor. | |
| PointCloud (PointCloud< PointT > &pc) | |
| Copy constructor (needed by compilers such as Intel C++) | |
| PointCloud (const PointCloud< PointT > &pc) | |
| Copy constructor (needed by compilers such as Intel C++) | |
| PointCloud (const PointCloud< PointT > &pc, const std::vector< int > &indices) | |
| Copy constructor from point cloud subset. | |
| PointCloud (uint32_t width_, uint32_t height_) | |
| Allocate constructor from point cloud subset. | |
| virtual | ~PointCloud () |
| Destructor. | |
| PointCloud & | operator+= (const PointCloud &rhs) |
| Add a point cloud to the current cloud. | |
| const PointCloud | operator+ (const PointCloud &rhs) |
| Add a point cloud to another cloud. | |
| const PointT & | at (int u, int v) const |
| Obtain the point given by the (u, v) coordinates. | |
| PointT & | at (int u, int v) |
| Obtain the point given by the (u, v) coordinates. | |
| const PointT & | operator() (int u, int v) const |
| Obtain the point given by the (u, v) coordinates. | |
| PointT & | operator() (int u, int v) |
| Obtain the point given by the (u, v) coordinates. | |
| bool | isOrganized () const |
| Return whether a dataset is organized (e.g., arranged in a structured grid). | |
| Eigen::Map< Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > | getMatrixXfMap (int dim, int stride, int offset) |
| Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud. | |
| const Eigen::Map< const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > | getMatrixXfMap (int dim, int stride, int offset) const |
| Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud. | |
| Eigen::Map< Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > | getMatrixXfMap () |
| Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud. | |
| const Eigen::Map< const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > | getMatrixXfMap () const |
| Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud. | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| size_t | size () const |
| void | reserve (size_t n) |
| void | resize (size_t n) |
| bool | empty () const |
| const PointT & | operator[] (size_t n) const |
| PointT & | operator[] (size_t n) |
| const PointT & | at (size_t n) const |
| PointT & | at (size_t n) |
| const PointT & | front () const |
| PointT & | front () |
| const PointT & | back () const |
| PointT & | back () |
| void | push_back (const PointT &pt) |
| Insert a new point in the cloud, at the end of the container. | |
| iterator | insert (iterator position, const PointT &pt) |
| Insert a new point in the cloud, given an iterator. | |
| void | insert (iterator position, size_t n, const PointT &pt) |
| Insert a new point in the cloud N times, given an iterator. | |
| template<class InputIterator > | |
| void | insert (iterator position, InputIterator first, InputIterator last) |
| Insert a new range of points in the cloud, at a certain position. | |
| iterator | erase (iterator position) |
| Erase a point in the cloud. | |
| iterator | erase (iterator first, iterator last) |
| Erase a set of points given by a (first, last) iterator pair. | |
| void | swap (PointCloud< PointT > &rhs) |
| Swap a point cloud with another cloud. | |
| void | clear () |
| Removes all points in a cloud and sets the width and height to 0. | |
| Ptr | makeShared () |
| Copy the cloud to the heap and return a smart pointer Note that deep copy is performed, so avoid using this function on non-empty clouds. | |
| ConstPtr | makeShared () const |
| Copy the cloud to the heap and return a constant smart pointer Note that deep copy is performed, so avoid using this function on non-empty clouds. | |
Public Attributes | |
| std_msgs::Header | header |
| The point cloud header. | |
| std::vector< PointT, Eigen::aligned_allocator < PointT > > | points |
| The point data. | |
| uint32_t | width |
| The point cloud width (if organized as an image-structure). | |
| uint32_t | height |
| The point cloud height (if organized as an image-structure). | |
| bool | is_dense |
| True if no points are invalid (e.g., have NaN or Inf values). | |
| Eigen::Vector4f | sensor_origin_ |
| Sensor acquisition pose (origin/translation). | |
| Eigen::Quaternionf | sensor_orientation_ |
| Sensor acquisition pose (rotation). | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW | |
Friends | |
| boost::shared_ptr< MsgFieldMap > & | detail::getMapping (pcl::PointCloud< PointT > &p) |
PointCloud represents the base class in PCL for storing collections of 3D points.
The class is templated, which means you need to specify the type of data that it should contain. For example, to create a point cloud that holds 4 random XYZ data points, use:
pcl::PointCloud<pcl::PointXYZ> cloud; cloud.push_back (pcl::PointXYZ (rand (), rand (), rand ())); cloud.push_back (pcl::PointXYZ (rand (), rand (), rand ())); cloud.push_back (pcl::PointXYZ (rand (), rand (), rand ())); cloud.push_back (pcl::PointXYZ (rand (), rand (), rand ()));
The PointCloud class contains the following elements:
Definition at line 116 of file point_cloud.h.
| typedef VectorType::const_iterator pcl::PointCloud< PointT >::const_iterator |
Definition at line 372 of file point_cloud.h.
| typedef boost::shared_ptr<const PointCloud<PointT> > pcl::PointCloud< PointT >::ConstPtr |
Reimplemented in pcl::RangeImage, and pcl::RangeImagePlanar.
Definition at line 368 of file point_cloud.h.
| typedef VectorType::iterator pcl::PointCloud< PointT >::iterator |
Definition at line 371 of file point_cloud.h.
| typedef PointT pcl::PointCloud< PointT >::PointType |
Definition at line 365 of file point_cloud.h.
| typedef boost::shared_ptr<PointCloud<PointT> > pcl::PointCloud< PointT >::Ptr |
Reimplemented in pcl::RangeImage, and pcl::RangeImagePlanar.
Definition at line 367 of file point_cloud.h.
| typedef std::vector<PointT, Eigen::aligned_allocator<PointT> > pcl::PointCloud< PointT >::VectorType |
Definition at line 366 of file point_cloud.h.
| pcl::PointCloud< PointT >::PointCloud | ( | ) | [inline] |
Default constructor.
Sets is_dense to true, width and height to 0, and the sensor_origin_ and sensor_orientation_ to identity.
Definition at line 123 of file point_cloud.h.
| pcl::PointCloud< PointT >::PointCloud | ( | PointCloud< PointT > & | pc | ) | [inline] |
Copy constructor (needed by compilers such as Intel C++)
| [in] | pc | the cloud to copy into this |
Definition at line 130 of file point_cloud.h.
| pcl::PointCloud< PointT >::PointCloud | ( | const PointCloud< PointT > & | pc | ) | [inline] |
Copy constructor (needed by compilers such as Intel C++)
| [in] | pc | the cloud to copy into this |
Definition at line 138 of file point_cloud.h.
| pcl::PointCloud< PointT >::PointCloud | ( | const PointCloud< PointT > & | pc, |
| const std::vector< int > & | indices | ||
| ) | [inline] |
Copy constructor from point cloud subset.
| [in] | pc | the cloud to copy into this |
| [in] | indices | the subset to copy |
Definition at line 147 of file point_cloud.h.
| pcl::PointCloud< PointT >::PointCloud | ( | uint32_t | width_, |
| uint32_t | height_ | ||
| ) | [inline] |
Allocate constructor from point cloud subset.
| [in] | width_ | the cloud width |
| [in] | height_ | the cloud height |
Definition at line 168 of file point_cloud.h.
| virtual pcl::PointCloud< PointT >::~PointCloud | ( | ) | [inline, virtual] |
Destructor.
Definition at line 178 of file point_cloud.h.
| const PointT& pcl::PointCloud< PointT >::at | ( | int | u, |
| int | v | ||
| ) | const [inline] |
Obtain the point given by the (u, v) coordinates.
Only works on organized datasets (those that have height != 1).
| [in] | u | the u coordinate |
| [in] | v | the v coordinate |
Definition at line 224 of file point_cloud.h.
| PointT& pcl::PointCloud< PointT >::at | ( | int | u, |
| int | v | ||
| ) | [inline] |
Obtain the point given by the (u, v) coordinates.
Only works on organized datasets (those that have height != 1).
| [in] | u | the u coordinate |
| [in] | v | the v coordinate |
Definition at line 238 of file point_cloud.h.
| const PointT& pcl::PointCloud< PointT >::at | ( | size_t | n | ) | const [inline] |
Definition at line 387 of file point_cloud.h.
| PointT& pcl::PointCloud< PointT >::at | ( | size_t | n | ) | [inline] |
Definition at line 388 of file point_cloud.h.
| const PointT& pcl::PointCloud< PointT >::back | ( | ) | const [inline] |
Definition at line 391 of file point_cloud.h.
| PointT& pcl::PointCloud< PointT >::back | ( | ) | [inline] |
Definition at line 392 of file point_cloud.h.
| iterator pcl::PointCloud< PointT >::begin | ( | ) | [inline] |
Definition at line 373 of file point_cloud.h.
| const_iterator pcl::PointCloud< PointT >::begin | ( | ) | const [inline] |
Definition at line 375 of file point_cloud.h.
| void pcl::PointCloud< PointT >::clear | ( | ) | [inline] |
Removes all points in a cloud and sets the width and height to 0.
Definition at line 494 of file point_cloud.h.
| bool pcl::PointCloud< PointT >::empty | ( | ) | const [inline] |
Definition at line 382 of file point_cloud.h.
| iterator pcl::PointCloud< PointT >::end | ( | ) | [inline] |
Definition at line 374 of file point_cloud.h.
| const_iterator pcl::PointCloud< PointT >::end | ( | ) | const [inline] |
Definition at line 376 of file point_cloud.h.
| iterator pcl::PointCloud< PointT >::erase | ( | iterator | position | ) | [inline] |
Erase a point in the cloud.
| [in] | position | what data point to erase |
Definition at line 455 of file point_cloud.h.
| iterator pcl::PointCloud< PointT >::erase | ( | iterator | first, |
| iterator | last | ||
| ) | [inline] |
Erase a set of points given by a (first, last) iterator pair.
| [in] | first | where to start erasing points from |
| [in] | last | where to stop erasing points from |
Definition at line 470 of file point_cloud.h.
| const PointT& pcl::PointCloud< PointT >::front | ( | ) | const [inline] |
Definition at line 389 of file point_cloud.h.
| PointT& pcl::PointCloud< PointT >::front | ( | ) | [inline] |
Definition at line 390 of file point_cloud.h.
| Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > pcl::PointCloud< PointT >::getMatrixXfMap | ( | int | dim, |
| int | stride, | ||
| int | offset | ||
| ) | [inline] |
Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud.
| [in] | dim | the number of dimensions to consider for each point |
| [in] | stride | the number of values in each point (will be the number of values that separate two of the columns) |
| [in] | offset | the number of dimensions to skip from the beginning of each point (stride = offset + dim + x, where x is the number of dimensions to skip from the end of each point) |
Definition at line 296 of file point_cloud.h.
| const Eigen::Map<const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > pcl::PointCloud< PointT >::getMatrixXfMap | ( | int | dim, |
| int | stride, | ||
| int | offset | ||
| ) | const [inline] |
Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud.
| [in] | dim | the number of dimensions to consider for each point |
| [in] | stride | the number of values in each point (will be the number of values that separate two of the columns) |
| [in] | offset | the number of dimensions to skip from the beginning of each point (stride = offset + dim + x, where x is the number of dimensions to skip from the end of each point) |
Definition at line 318 of file point_cloud.h.
| Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > pcl::PointCloud< PointT >::getMatrixXfMap | ( | ) | [inline] |
Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud.
Definition at line 330 of file point_cloud.h.
| const Eigen::Map<const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > pcl::PointCloud< PointT >::getMatrixXfMap | ( | ) | const [inline] |
Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud.
Definition at line 341 of file point_cloud.h.
| iterator pcl::PointCloud< PointT >::insert | ( | iterator | position, |
| const PointT & | pt | ||
| ) | [inline] |
Insert a new point in the cloud, given an iterator.
| [in] | position | where to insert the point |
| [in] | pt | the point to insert |
Definition at line 413 of file point_cloud.h.
| void pcl::PointCloud< PointT >::insert | ( | iterator | position, |
| size_t | n, | ||
| const PointT & | pt | ||
| ) | [inline] |
Insert a new point in the cloud N times, given an iterator.
| [in] | position | where to insert the point |
| [in] | n | the number of times to insert the point |
| [in] | pt | the point to insert |
Definition at line 428 of file point_cloud.h.
| void pcl::PointCloud< PointT >::insert | ( | iterator | position, |
| InputIterator | first, | ||
| InputIterator | last | ||
| ) | [inline] |
Insert a new range of points in the cloud, at a certain position.
| [in] | position | where to insert the data |
| [in] | first | where to start inserting the points from |
| [in] | last | where to stop inserting the points from |
Definition at line 442 of file point_cloud.h.
| bool pcl::PointCloud< PointT >::isOrganized | ( | ) | const [inline] |
Return whether a dataset is organized (e.g., arranged in a structured grid).
Definition at line 274 of file point_cloud.h.
| Ptr pcl::PointCloud< PointT >::makeShared | ( | ) | [inline] |
Copy the cloud to the heap and return a smart pointer Note that deep copy is performed, so avoid using this function on non-empty clouds.
The changes of the returned cloud are not mirrored back to this one.
Reimplemented in pcl::RangeImage, and pcl::RangeImagePlanar.
Definition at line 507 of file point_cloud.h.
| ConstPtr pcl::PointCloud< PointT >::makeShared | ( | ) | const [inline] |
Copy the cloud to the heap and return a constant smart pointer Note that deep copy is performed, so avoid using this function on non-empty clouds.
Definition at line 514 of file point_cloud.h.
| const PointT& pcl::PointCloud< PointT >::operator() | ( | int | u, |
| int | v | ||
| ) | const [inline] |
Obtain the point given by the (u, v) coordinates.
Only works on organized datasets (those that have height != 1).
| [in] | u | the u coordinate |
| [in] | v | the v coordinate |
Definition at line 253 of file point_cloud.h.
| PointT& pcl::PointCloud< PointT >::operator() | ( | int | u, |
| int | v | ||
| ) | [inline] |
Obtain the point given by the (u, v) coordinates.
Only works on organized datasets (those that have height != 1).
| [in] | u | the u coordinate |
| [in] | v | the v coordinate |
Definition at line 264 of file point_cloud.h.
| const PointCloud pcl::PointCloud< PointT >::operator+ | ( | const PointCloud< PointT > & | rhs | ) | [inline] |
Add a point cloud to another cloud.
| [in] | rhs | the cloud to add to the current cloud |
Definition at line 212 of file point_cloud.h.
| PointCloud& pcl::PointCloud< PointT >::operator+= | ( | const PointCloud< PointT > & | rhs | ) | [inline] |
Add a point cloud to the current cloud.
| [in] | rhs | the cloud to add to the current cloud |
Definition at line 186 of file point_cloud.h.
| const PointT& pcl::PointCloud< PointT >::operator[] | ( | size_t | n | ) | const [inline] |
Definition at line 385 of file point_cloud.h.
| PointT& pcl::PointCloud< PointT >::operator[] | ( | size_t | n | ) | [inline] |
Definition at line 386 of file point_cloud.h.
| void pcl::PointCloud< PointT >::push_back | ( | const PointT & | pt | ) | [inline] |
Insert a new point in the cloud, at the end of the container.
| [in] | pt | the point to insert |
Definition at line 399 of file point_cloud.h.
| void pcl::PointCloud< PointT >::reserve | ( | size_t | n | ) | [inline] |
Definition at line 380 of file point_cloud.h.
| void pcl::PointCloud< PointT >::resize | ( | size_t | n | ) | [inline] |
Definition at line 381 of file point_cloud.h.
| size_t pcl::PointCloud< PointT >::size | ( | ) | const [inline] |
Definition at line 379 of file point_cloud.h.
| void pcl::PointCloud< PointT >::swap | ( | PointCloud< PointT > & | rhs | ) | [inline] |
Swap a point cloud with another cloud.
| [in,out] | rhs | point cloud to swap this with |
Definition at line 482 of file point_cloud.h.
| boost::shared_ptr<MsgFieldMap>& detail::getMapping | ( | pcl::PointCloud< PointT > & | p | ) | [friend] |
| pcl::PointCloud< PointT >::EIGEN_MAKE_ALIGNED_OPERATOR_NEW |
Definition at line 523 of file point_cloud.h.
| std_msgs::Header pcl::PointCloud< PointT >::header |
The point cloud header.
It contains information about the acquisition time.
Definition at line 347 of file point_cloud.h.
| uint32_t pcl::PointCloud< PointT >::height |
The point cloud height (if organized as an image-structure).
Definition at line 355 of file point_cloud.h.
| bool pcl::PointCloud< PointT >::is_dense |
True if no points are invalid (e.g., have NaN or Inf values).
Definition at line 358 of file point_cloud.h.
| std::vector<PointT, Eigen::aligned_allocator<PointT> > pcl::PointCloud< PointT >::points |
The point data.
Definition at line 350 of file point_cloud.h.
| Eigen::Quaternionf pcl::PointCloud< PointT >::sensor_orientation_ |
Sensor acquisition pose (rotation).
Definition at line 363 of file point_cloud.h.
| Eigen::Vector4f pcl::PointCloud< PointT >::sensor_origin_ |
Sensor acquisition pose (origin/translation).
Definition at line 361 of file point_cloud.h.
| uint32_t pcl::PointCloud< PointT >::width |
The point cloud width (if organized as an image-structure).
Definition at line 353 of file point_cloud.h.
1.7.6.1