Public Types | Public Member Functions | Public Attributes | Protected Attributes | Friends

pcl::PointCloud< PointT > Class Template Reference

PointCloud represents a templated PointCloud implementation. More...

#include <pcl/point_cloud.h>

Collaboration diagram for pcl::PointCloud< PointT >:
Collaboration graph
[legend]

List of all members.

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 ()
 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< size_t > &indices)
 Copy constructor from point cloud subset.
PointCloudoperator+= (const PointCloud &rhs)
PointT at (int u, int v) const
const PointT & operator() (int u, int v) const
PointT & operator() (int u, int v)
bool isOrganized () const
 Return whether a dataset is organized (e.g., arranged in a structured grid).
Eigen::MatrixXf getMatrixXfMap (int dim, int stride, int offset)
 Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud.
Eigen::MatrixXf getMatrixXfMap ()
 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 &p)
iterator insert (iterator position, const PointT &x)
void insert (iterator position, size_t n, const PointT &x)
template<class InputIterator >
void insert (iterator position, InputIterator first, InputIterator last)
iterator erase (iterator position)
iterator erase (iterator first, iterator last)
void swap (PointCloud< PointT > &rhs)
void clear ()
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

Protected Attributes

boost::shared_ptr< MsgFieldMapmapping_

Friends

boost::shared_ptr< MsgFieldMap > & detail::getMapping (pcl::PointCloud< PointT > &p)

Detailed Description

template<typename PointT>
class pcl::PointCloud< PointT >

PointCloud represents a templated PointCloud implementation.

Author:
Patrick Mihelich, Radu Bogdan Rusu

Definition at line 79 of file point_cloud.h.


Member Typedef Documentation

template<typename PointT>
typedef VectorType::const_iterator pcl::PointCloud< PointT >::const_iterator

Definition at line 228 of file point_cloud.h.

template<typename PointT>
typedef boost::shared_ptr<const PointCloud<PointT> > pcl::PointCloud< PointT >::ConstPtr

Reimplemented in pcl::RangeImage, and pcl::RangeImagePlanar.

Definition at line 224 of file point_cloud.h.

template<typename PointT>
typedef VectorType::iterator pcl::PointCloud< PointT >::iterator

Definition at line 227 of file point_cloud.h.

template<typename PointT>
typedef PointT pcl::PointCloud< PointT >::PointType

Definition at line 221 of file point_cloud.h.

template<typename PointT>
typedef boost::shared_ptr<PointCloud<PointT> > pcl::PointCloud< PointT >::Ptr

Reimplemented in pcl::RangeImage, and pcl::RangeImagePlanar.

Definition at line 223 of file point_cloud.h.

template<typename PointT>
typedef std::vector<PointT, Eigen::aligned_allocator<PointT> > pcl::PointCloud< PointT >::VectorType

Definition at line 222 of file point_cloud.h.


Constructor & Destructor Documentation

template<typename PointT>
pcl::PointCloud< PointT >::PointCloud (  )  [inline]

Definition at line 82 of file point_cloud.h.

template<typename PointT>
pcl::PointCloud< PointT >::PointCloud ( PointCloud< PointT > &  pc  )  [inline]

Copy constructor (needed by compilers such as Intel C++).

Parameters:
pc the cloud to copy into this

Definition at line 89 of file point_cloud.h.

template<typename PointT>
pcl::PointCloud< PointT >::PointCloud ( const PointCloud< PointT > &  pc  )  [inline]

Copy constructor (needed by compilers such as Intel C++).

Parameters:
pc the cloud to copy into this

Definition at line 97 of file point_cloud.h.

template<typename PointT>
pcl::PointCloud< PointT >::PointCloud ( const PointCloud< PointT > &  pc,
const std::vector< size_t > &  indices 
) [inline]

Copy constructor from point cloud subset.

Parameters:
pc the cloud to copy into this
indices the subset to copy

Definition at line 106 of file point_cloud.h.


Member Function Documentation

template<typename PointT>
PointT pcl::PointCloud< PointT >::at ( int  u,
int  v 
) const [inline]

Definition at line 148 of file point_cloud.h.

template<typename PointT>
const PointT& pcl::PointCloud< PointT >::at ( size_t  n  )  const [inline]

Definition at line 243 of file point_cloud.h.

template<typename PointT>
PointT& pcl::PointCloud< PointT >::at ( size_t  n  )  [inline]

Definition at line 244 of file point_cloud.h.

template<typename PointT>
const PointT& pcl::PointCloud< PointT >::back (  )  const [inline]

Definition at line 247 of file point_cloud.h.

template<typename PointT>
PointT& pcl::PointCloud< PointT >::back (  )  [inline]

Definition at line 248 of file point_cloud.h.

template<typename PointT>
iterator pcl::PointCloud< PointT >::begin (  )  [inline]

Definition at line 229 of file point_cloud.h.

template<typename PointT>
const_iterator pcl::PointCloud< PointT >::begin (  )  const [inline]

Definition at line 231 of file point_cloud.h.

template<typename PointT>
void pcl::PointCloud< PointT >::clear (  )  [inline]

Definition at line 294 of file point_cloud.h.

template<typename PointT>
bool pcl::PointCloud< PointT >::empty (  )  const [inline]

Definition at line 238 of file point_cloud.h.

template<typename PointT>
iterator pcl::PointCloud< PointT >::end (  )  [inline]

Definition at line 230 of file point_cloud.h.

template<typename PointT>
const_iterator pcl::PointCloud< PointT >::end (  )  const [inline]

Definition at line 232 of file point_cloud.h.

template<typename PointT>
iterator pcl::PointCloud< PointT >::erase ( iterator  first,
iterator  last 
) [inline]

Definition at line 281 of file point_cloud.h.

template<typename PointT>
iterator pcl::PointCloud< PointT >::erase ( iterator  position  )  [inline]

Definition at line 274 of file point_cloud.h.

template<typename PointT>
const PointT& pcl::PointCloud< PointT >::front (  )  const [inline]

Definition at line 245 of file point_cloud.h.

template<typename PointT>
PointT& pcl::PointCloud< PointT >::front (  )  [inline]

Definition at line 246 of file point_cloud.h.

template<typename PointT>
Eigen::MatrixXf 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.

Parameters:
dim the number of dimensions to consider for each point (will become the number of rows)
stride the number of values in each point (will be the number of values that separate two of the columns)
offset the number of dimensions to skip from the beginning of each point (note stride = offset + dim + x, where x is the number of dimensions to skip from the end of each point)
Note:
for getting only XYZ coordinates out of PointXYZ use dim=3, stride=4 and offset=0 due to the alignment.

Definition at line 187 of file point_cloud.h.

template<typename PointT>
Eigen::MatrixXf pcl::PointCloud< PointT >::getMatrixXfMap (  )  [inline]

Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud.

Definition at line 196 of file point_cloud.h.

template<typename PointT>
iterator pcl::PointCloud< PointT >::insert ( iterator  position,
const PointT &  x 
) [inline]

Definition at line 256 of file point_cloud.h.

template<typename PointT>
void pcl::PointCloud< PointT >::insert ( iterator  position,
size_t  n,
const PointT &  x 
) [inline]

Definition at line 263 of file point_cloud.h.

template<typename PointT>
template<class InputIterator >
void pcl::PointCloud< PointT >::insert ( iterator  position,
InputIterator  first,
InputIterator  last 
) [inline]

Definition at line 270 of file point_cloud.h.

template<typename PointT>
bool pcl::PointCloud< PointT >::isOrganized (  )  const [inline]

Return whether a dataset is organized (e.g., arranged in a structured grid).

Definition at line 173 of file point_cloud.h.

template<typename PointT>
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.

Returns:
shared pointer to the copy of the cloud

Reimplemented in pcl::RangeImage, and pcl::RangeImagePlanar.

Definition at line 306 of file point_cloud.h.

template<typename PointT>
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.

Returns:
const shared pointer to the copy of the cloud

Definition at line 312 of file point_cloud.h.

template<typename PointT>
PointT& pcl::PointCloud< PointT >::operator() ( int  u,
int  v 
) [inline]

Definition at line 164 of file point_cloud.h.

template<typename PointT>
const PointT& pcl::PointCloud< PointT >::operator() ( int  u,
int  v 
) const [inline]

Definition at line 158 of file point_cloud.h.

template<typename PointT>
PointCloud& pcl::PointCloud< PointT >::operator+= ( const PointCloud< PointT > &  rhs  )  [inline]

Definition at line 119 of file point_cloud.h.

template<typename PointT>
PointT& pcl::PointCloud< PointT >::operator[] ( size_t  n  )  [inline]

Definition at line 242 of file point_cloud.h.

template<typename PointT>
const PointT& pcl::PointCloud< PointT >::operator[] ( size_t  n  )  const [inline]

Definition at line 241 of file point_cloud.h.

template<typename PointT>
void pcl::PointCloud< PointT >::push_back ( const PointT &  p  )  [inline]

Definition at line 251 of file point_cloud.h.

template<typename PointT>
void pcl::PointCloud< PointT >::reserve ( size_t  n  )  [inline]

Definition at line 236 of file point_cloud.h.

template<typename PointT>
void pcl::PointCloud< PointT >::resize ( size_t  n  )  [inline]

Definition at line 237 of file point_cloud.h.

template<typename PointT>
size_t pcl::PointCloud< PointT >::size (  )  const [inline]

Definition at line 235 of file point_cloud.h.

template<typename PointT>
void pcl::PointCloud< PointT >::swap ( PointCloud< PointT > &  rhs  )  [inline]

Definition at line 288 of file point_cloud.h.


Friends And Related Function Documentation

template<typename PointT>
boost::shared_ptr<MsgFieldMap>& detail::getMapping ( pcl::PointCloud< PointT > &  p  )  [friend]

Member Data Documentation

template<typename PointT>
pcl::PointCloud< PointT >::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Definition at line 321 of file point_cloud.h.

template<typename PointT>
std_msgs::Header pcl::PointCloud< PointT >::header

The point cloud header.

It contains information about the acquisition time, as well as a transform frame (see tf).

Definition at line 203 of file point_cloud.h.

template<typename PointT>
uint32_t pcl::PointCloud< PointT >::height

The point cloud height (if organized as an image-structure).

Definition at line 211 of file point_cloud.h.

template<typename PointT>
bool pcl::PointCloud< PointT >::is_dense

True if no points are invalid (e.g., have NaN or Inf values).

Definition at line 214 of file point_cloud.h.

template<typename PointT>
boost::shared_ptr<MsgFieldMap> pcl::PointCloud< PointT >::mapping_ [protected]

Definition at line 316 of file point_cloud.h.

template<typename PointT>
std::vector<PointT, Eigen::aligned_allocator<PointT> > pcl::PointCloud< PointT >::points

The point data.

Definition at line 206 of file point_cloud.h.

template<typename PointT>
Eigen::Quaternionf pcl::PointCloud< PointT >::sensor_orientation_

Sensor acquisition pose (rotation).

Definition at line 219 of file point_cloud.h.

template<typename PointT>
Eigen::Vector4f pcl::PointCloud< PointT >::sensor_origin_

Sensor acquisition pose (origin/translation).

Definition at line 217 of file point_cloud.h.

template<typename PointT>
uint32_t pcl::PointCloud< PointT >::width

The point cloud width (if organized as an image-structure).

Definition at line 209 of file point_cloud.h.


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