Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Types | Public Member Functions
pcl::GridProjection< PointNT > Class Template Reference

Grid projection surface reconstruction method. More...

#include <pcl/surface/grid_projection.h>

Inheritance diagram for pcl::GridProjection< PointNT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::GridProjection< PointNT >:
Collaboration graph
[legend]

List of all members.

Classes

struct  Leaf
 Data leaf. More...

Public Types

typedef pcl::PointCloud
< PointNT >::Ptr 
PointCloudPtr
typedef pcl::KdTree< PointNT > KdTree
typedef pcl::KdTree< PointNT >::Ptr KdTreePtr
typedef boost::unordered_map
< int, Leaf, boost::hash< int >
, std::equal_to< int >
, Eigen::aligned_allocator
< int > > 
HashMap
typedef pcl::PointCloud< PointNT > PointCloud
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef PointIndices::Ptr PointIndicesPtr
typedef PointIndices::ConstPtr PointIndicesConstPtr

Public Member Functions

 GridProjection ()
 Constructor.
 GridProjection (double in_resolution)
 Constructor.
 ~GridProjection ()
 Destructor.
void setResolution (double resolution)
 Set the size of the grid cell.
double getResolution () const
void setPaddingSize (int padding_size)
 When averaging the vectors, we find the union of all the input data points within the padding area,and do a weighted average.
int getPaddingSize () const
void setNearestNeighborNum (int k)
 Set this only when using the k nearest neighbors search instead of finding the point union.
int getNearestNeighborNum () const
void setMaxBinarySearchLevel (int max_binary_search_level)
 Binary search is used in projection.
int getMaxBinarySearchLevel () const
const HashMapgetCellHashMap () const
const std::vector
< Eigen::Vector3f,
Eigen::aligned_allocator
< Eigen::Vector3f > > & 
getVectorAtDataPoint () const
const std::vector
< Eigen::Vector4f,
Eigen::aligned_allocator
< Eigen::Vector4f > > & 
getSurface () const
virtual void reconstruct (pcl::PolygonMesh &output)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>
virtual void reconstruct (pcl::PointCloud< PointNT > &points, std::vector< pcl::Vertices > &polygons)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>
void setSearchMethod (const KdTreePtr &tree)
 Provide an optional pointer to a search object.
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used.
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset.
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
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.
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used.
const PointNT & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code.

Detailed Description

template<typename PointNT>
class pcl::GridProjection< PointNT >

Grid projection surface reconstruction method.

Author:
Rosie Li
Note:
If you use this code in any academic work, please cite:
  • Ruosi Li, Lu Liu, Ly Phan, Sasakthi Abeysinghe, Cindy Grimm, Tao Ju. Polygonizing extremal surfaces with manifold guarantees. In Proceedings of the 14th ACM Symposium on Solid and Physical Modeling, 2010.

Definition at line 73 of file grid_projection.h.


Member Typedef Documentation

template<typename PointNT >
typedef boost::unordered_map<int, Leaf, boost::hash<int>, std::equal_to<int>, Eigen::aligned_allocator<int> > pcl::GridProjection< PointNT >::HashMap

Definition at line 94 of file grid_projection.h.

template<typename PointNT >
typedef pcl::KdTree<PointNT> pcl::GridProjection< PointNT >::KdTree

Reimplemented from pcl::PCLSurfaceBase< PointNT >.

Definition at line 81 of file grid_projection.h.

template<typename PointNT >
typedef pcl::KdTree<PointNT>::Ptr pcl::GridProjection< PointNT >::KdTreePtr

Reimplemented from pcl::PCLSurfaceBase< PointNT >.

Definition at line 82 of file grid_projection.h.

typedef pcl::PointCloud<PointNT > pcl::PCLBase< PointNT >::PointCloud [inherited]

Definition at line 74 of file pcl_base.h.

typedef PointCloud::ConstPtr pcl::PCLBase< PointNT >::PointCloudConstPtr [inherited]

Definition at line 76 of file pcl_base.h.

template<typename PointNT >
typedef pcl::PointCloud<PointNT>::Ptr pcl::GridProjection< PointNT >::PointCloudPtr

Reimplemented from pcl::PCLBase< PointNT >.

Definition at line 79 of file grid_projection.h.

typedef PointIndices::ConstPtr pcl::PCLBase< PointNT >::PointIndicesConstPtr [inherited]

Definition at line 79 of file pcl_base.h.

typedef PointIndices::Ptr pcl::PCLBase< PointNT >::PointIndicesPtr [inherited]

Definition at line 78 of file pcl_base.h.


Constructor & Destructor Documentation

template<typename PointNT >
pcl::GridProjection< PointNT >::GridProjection ( )

Constructor.

Definition at line 49 of file grid_projection.hpp.

template<typename PointNT >
pcl::GridProjection< PointNT >::GridProjection ( double  in_resolution)

Constructor.

Parameters:
in_resolutionset the resolution of the grid

Definition at line 57 of file grid_projection.hpp.

template<typename PointNT >
pcl::GridProjection< PointNT >::~GridProjection ( )

Destructor.

Definition at line 65 of file grid_projection.hpp.


Member Function Documentation

template<typename PointNT >
const HashMap& pcl::GridProjection< PointNT >::getCellHashMap ( ) const [inline]

Definition at line 174 of file grid_projection.h.

IndicesPtr const pcl::PCLBase< PointNT >::getIndices ( ) [inline, inherited]

Get a pointer to the vector of indices used.

Definition at line 190 of file pcl_base.h.

PointCloudConstPtr const pcl::PCLBase< PointNT >::getInputCloud ( ) [inline, inherited]

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointNT >
int pcl::GridProjection< PointNT >::getMaxBinarySearchLevel ( ) const [inline]

Definition at line 167 of file grid_projection.h.

template<typename PointNT >
int pcl::GridProjection< PointNT >::getNearestNeighborNum ( ) const [inline]

Definition at line 152 of file grid_projection.h.

template<typename PointNT >
int pcl::GridProjection< PointNT >::getPaddingSize ( ) const [inline]

Definition at line 137 of file grid_projection.h.

template<typename PointNT >
double pcl::GridProjection< PointNT >::getResolution ( ) const [inline]

Definition at line 117 of file grid_projection.h.

KdTreePtr pcl::PCLSurfaceBase< PointNT >::getSearchMethod ( ) [inline, inherited]

Get a pointer to the search method used.

Definition at line 82 of file reconstruction.h.

template<typename PointNT >
const std::vector<Eigen::Vector4f, Eigen::aligned_allocator<Eigen::Vector4f> >& pcl::GridProjection< PointNT >::getSurface ( ) const [inline]

Definition at line 186 of file grid_projection.h.

template<typename PointNT >
const std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> >& pcl::GridProjection< PointNT >::getVectorAtDataPoint ( ) const [inline]

Definition at line 180 of file grid_projection.h.

const PointNT & pcl::PCLBase< PointNT >::operator[] ( size_t  pos) [inline, inherited]

Override PointCloud operator[] to shorten code.

Note:
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters:
posposition in indices_ vector

Definition at line 197 of file pcl_base.h.

virtual void pcl::SurfaceReconstruction< PointNT >::reconstruct ( pcl::PolygonMesh output) [virtual, inherited]

Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>

Parameters:
[out]outputthe resultant reconstructed surface model

Implements pcl::PCLSurfaceBase< PointNT >.

virtual void pcl::SurfaceReconstruction< PointNT >::reconstruct ( pcl::PointCloud< PointNT > &  points,
std::vector< pcl::Vertices > &  polygons 
) [virtual, inherited]

Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>

Parameters:
[out]pointsthe resultant points lying on the new surface
[out]polygonsthe resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.
void pcl::PCLBase< PointNT >::setIndices ( const IndicesPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 113 of file pcl_base.h.

void pcl::PCLBase< PointNT >::setIndices ( const IndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 124 of file pcl_base.h.

void pcl::PCLBase< PointNT >::setIndices ( const PointIndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 135 of file pcl_base.h.

void pcl::PCLBase< PointNT >::setIndices ( size_t  row_start,
size_t  col_start,
size_t  nb_rows,
size_t  nb_cols 
) [inline, inherited]

Set the indices for the points laying within an interest region of the point cloud.

Note:
you shouldn't call this method on unorganized point clouds!
Parameters:
row_startthe offset on rows
col_startthe offset on columns
nb_rowsthe number of rows to be considered row_start included
nb_colsthe number of columns to be considered col_start included

Definition at line 151 of file pcl_base.h.

virtual void pcl::PCLBase< PointNT >::setInputCloud ( const PointCloudConstPtr cloud) [inline, virtual, inherited]

Provide a pointer to the input dataset.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Definition at line 103 of file pcl_base.h.

template<typename PointNT >
void pcl::GridProjection< PointNT >::setMaxBinarySearchLevel ( int  max_binary_search_level) [inline]

Binary search is used in projection.

given a point x, we find another point which is 3*cell_size_ far away from x. Then we do a binary search between these two points to find where the projected point should be.

Definition at line 162 of file grid_projection.h.

template<typename PointNT >
void pcl::GridProjection< PointNT >::setNearestNeighborNum ( int  k) [inline]

Set this only when using the k nearest neighbors search instead of finding the point union.

Parameters:
kThe number of nearest neighbors we are looking for

Definition at line 147 of file grid_projection.h.

template<typename PointNT >
void pcl::GridProjection< PointNT >::setPaddingSize ( int  padding_size) [inline]

When averaging the vectors, we find the union of all the input data points within the padding area,and do a weighted average.

Say if the padding size is 1, when we process cell (x,y,z), we will find union of input data points from (x-1) to (x+1), (y-1) to (y+1), (z-1) to (z+1)(in total, 27 cells). In this way, even the cells itself doesnt contain any data points, we will stil process it because there are data points in the padding area. This can help us fix holes which is smaller than the padding size.

Parameters:
padding_sizeThe num of padding cells we want to create

Definition at line 132 of file grid_projection.h.

template<typename PointNT >
void pcl::GridProjection< PointNT >::setResolution ( double  resolution) [inline]

Set the size of the grid cell.

Parameters:
resolutionthe size of the grid cell

Definition at line 111 of file grid_projection.h.

void pcl::PCLSurfaceBase< PointNT >::setSearchMethod ( const KdTreePtr tree) [inline, inherited]

Provide an optional pointer to a search object.

Parameters:
[in]treea pointer to the spatial search object.

Definition at line 75 of file reconstruction.h.


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