Point Cloud Library (PCL)  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Public Attributes
pcl::PointCloud< Eigen::MatrixXf > Class Template Reference

PointCloud specialization for Eigen matrices. More...

#include <pcl/point_cloud.h>

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

List of all members.

Public Types

typedef boost::shared_ptr
< PointCloud< Eigen::MatrixXf > > 
Ptr
typedef boost::shared_ptr
< const PointCloud
< Eigen::MatrixXf > > 
ConstPtr

Public Member Functions

 PointCloud ()
 Default constructor.
 PointCloud (PointCloud< Eigen::MatrixXf > &pc)
 Copy constructor (needed by compilers such as Intel C++)
template<typename PointT >
 PointCloud (PointCloud< PointT > &pc)
 Copy conversion constructor (needed by compilers such as Intel C++)
 PointCloud (const PointCloud< Eigen::MatrixXf > &pc)
 Copy constructor (needed by compilers such as Intel C++)
template<typename PointT >
 PointCloud (const PointCloud< PointT > &pc)
 Copy conversion constructor (needed by compilers such as Intel C++)
 PointCloud (const PointCloud &pc, const std::vector< int > &indices)
 Copy constructor from point cloud subset.
 PointCloud (uint32_t _width, uint32_t _height, uint32_t _dim)
 Initialize size constructor for organized point cloud datasets.
 PointCloud (uint32_t _num_points, uint32_t _dim)
 Initialize size constructor for unorganized point cloud datasets.
virtual ~PointCloud ()
 Destructor.
PointCloudoperator+= (const PointCloud &rhs)
 Add a point cloud to the current cloud.
const PointCloud operator+ (const PointCloud &rhs)
 Add a point cloud to another cloud.
Eigen::Map< Eigen::VectorXf > at (int u, int v)
 Obtain the point given by the (u, v) coordinates.
Eigen::Map< Eigen::VectorXf > 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).
void swap (PointCloud< Eigen::MatrixXf > &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

pcl::CloudProperties properties
 A list of optional point cloud properties.
Eigen::MatrixXf points
 The point data.
std::map< std::string,
pcl::ChannelProperties
channels
 The channel data information.
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_MAKE_ALIGNED_OPERATOR_NEW

Detailed Description

template<>
class pcl::PointCloud< Eigen::MatrixXf >

PointCloud specialization for Eigen matrices.

For advanced users only!

Attention:
As opposed to the generic PointCloud<T> implementation where the point cloud data is stored in a std::vector<T>, this specialization uses an Eigen::MatrixXf. This means that this specialization is NOT suitable for other types of data other than floats, and should therefore be used with extreme caution!
Note:
Similar to PointCloud<T> where each data point represents a new element in the vector, we are storing each data point on a separate row in our MatrixXf, in a row-major format. This means that the data is aligned in memory in a row-major format. Please check that PCL is compiled using -DEIGEN_DEFAULT_TO_ROW_MAJOR.
Author:
Radu B. Rusu

Definition at line 545 of file point_cloud.h.


Member Typedef Documentation

typedef boost::shared_ptr<const PointCloud<Eigen::MatrixXf> > pcl::PointCloud< Eigen::MatrixXf >::ConstPtr

Definition at line 763 of file point_cloud.h.

typedef boost::shared_ptr<PointCloud<Eigen::MatrixXf> > pcl::PointCloud< Eigen::MatrixXf >::Ptr

Definition at line 762 of file point_cloud.h.


Constructor & Destructor Documentation

pcl::PointCloud< Eigen::MatrixXf >::PointCloud ( ) [inline]

Default constructor.

Sets is_dense to true, width and height to 0.

Definition at line 551 of file point_cloud.h.

pcl::PointCloud< Eigen::MatrixXf >::PointCloud ( PointCloud< Eigen::MatrixXf > &  pc) [inline]

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

Parameters:
[in]pcthe cloud to copy into this

Definition at line 558 of file point_cloud.h.

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

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

Parameters:
[in]pcthe cloud<T> to copy into this

Definition at line 567 of file point_cloud.h.

pcl::PointCloud< Eigen::MatrixXf >::PointCloud ( const PointCloud< Eigen::MatrixXf > &  pc) [inline]

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

Parameters:
[in]pcthe cloud to copy into this

Definition at line 591 of file point_cloud.h.

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

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

Parameters:
[in]pcthe cloud<T> to copy into this

Definition at line 600 of file point_cloud.h.

pcl::PointCloud< Eigen::MatrixXf >::PointCloud ( const PointCloud< Eigen::MatrixXf > &  pc,
const std::vector< int > &  indices 
) [inline]

Copy constructor from point cloud subset.

Parameters:
[in]pcthe cloud to copy into this
[in]indicesthe subset to copy

Definition at line 626 of file point_cloud.h.

pcl::PointCloud< Eigen::MatrixXf >::PointCloud ( uint32_t  _width,
uint32_t  _height,
uint32_t  _dim 
) [inline]

Initialize size constructor for organized point cloud datasets.

Sets is_dense to true.

Parameters:
[in]_widththe number of points in the cloud per row (if organized set to the width of the image, else set to the total number of points)
[in]_heightthe number of points in the cloud per column (if organized set to the height of the image, else set to 1)
[in]_dimthe number of dimensions that each point entry will have (e.g., 3=3D, 6=6D)

Definition at line 647 of file point_cloud.h.

pcl::PointCloud< Eigen::MatrixXf >::PointCloud ( uint32_t  _num_points,
uint32_t  _dim 
) [inline]

Initialize size constructor for unorganized point cloud datasets.

Sets is_dense to true.

Parameters:
[in]_num_pointsthe number of points in the cloud. Sets width to _num_points and height to 1.
[in]_dimthe number of dimensions that each point entry will have (e.g., 3=3D, 6=6D)

Definition at line 658 of file point_cloud.h.

virtual pcl::PointCloud< Eigen::MatrixXf >::~PointCloud ( ) [inline, virtual]

Destructor.

Definition at line 666 of file point_cloud.h.


Member Function Documentation

Eigen::Map<Eigen::VectorXf> pcl::PointCloud< Eigen::MatrixXf >::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).

Parameters:
[in]uthe u coordinate
[in]vthe v coordinate

Definition at line 715 of file point_cloud.h.

void pcl::PointCloud< Eigen::MatrixXf >::clear ( ) [inline]

Removes all points in a cloud and sets the width and height to 0.

Definition at line 781 of file point_cloud.h.

bool pcl::PointCloud< Eigen::MatrixXf >::isOrganized ( ) const [inline]

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

Note:
The height value must be different than 1 for a dataset to be organized.

Definition at line 740 of file point_cloud.h.

Ptr pcl::PointCloud< Eigen::MatrixXf >::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

Definition at line 794 of file point_cloud.h.

ConstPtr pcl::PointCloud< Eigen::MatrixXf >::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 801 of file point_cloud.h.

Eigen::Map<Eigen::VectorXf> pcl::PointCloud< Eigen::MatrixXf >::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).

Parameters:
[in]uthe u coordinate
[in]vthe v coordinate

Definition at line 730 of file point_cloud.h.

const PointCloud pcl::PointCloud< Eigen::MatrixXf >::operator+ ( const PointCloud< Eigen::MatrixXf > &  rhs) [inline]

Add a point cloud to another cloud.

Parameters:
[in]rhsthe cloud to add to the current cloud
Returns:
the new cloud as a concatenation of the current cloud and the new given cloud

Definition at line 703 of file point_cloud.h.

PointCloud& pcl::PointCloud< Eigen::MatrixXf >::operator+= ( const PointCloud< Eigen::MatrixXf > &  rhs) [inline]

Add a point cloud to the current cloud.

Parameters:
[in]rhsthe cloud to add to the current cloud
Returns:
the new cloud as a concatenation of the current cloud and the new given cloud

Definition at line 674 of file point_cloud.h.

void pcl::PointCloud< Eigen::MatrixXf >::swap ( PointCloud< Eigen::MatrixXf > &  rhs) [inline]

Swap a point cloud with another cloud.

Parameters:
[in,out]rhspoint cloud to swap this with

Definition at line 769 of file point_cloud.h.


Member Data Documentation

std::map<std::string, pcl::ChannelProperties> pcl::PointCloud< Eigen::MatrixXf >::channels

The channel data information.

We need the entries to be ordered here.

Definition at line 752 of file point_cloud.h.

Definition at line 804 of file point_cloud.h.

uint32_t pcl::PointCloud< Eigen::MatrixXf >::height

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

Definition at line 757 of file point_cloud.h.

bool pcl::PointCloud< Eigen::MatrixXf >::is_dense

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

Definition at line 760 of file point_cloud.h.

Eigen::MatrixXf pcl::PointCloud< Eigen::MatrixXf >::points

The point data.

Definition at line 749 of file point_cloud.h.

A list of optional point cloud properties.

See CloudProperties for more information.

Definition at line 746 of file point_cloud.h.

uint32_t pcl::PointCloud< Eigen::MatrixXf >::width

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

Definition at line 755 of file point_cloud.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines