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

The marching cubes surface reconstruction algorithm. More...

#include <pcl/surface/marching_cubes.h>

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

List of all members.

Classes

struct  Leaf
 Simple structure to hold a voxel. More...

Public Types

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

Public Member Functions

 MarchingCubes ()
 Constructor.
 ~MarchingCubes ()
 Destructor.
void setLeafSize (double leaf_size)
 set the voxel size.
void setIsoLevel (float iso_level)
 set the iso level.
void getCellIndex (const Eigen::Vector4f &p, Eigen::Vector3i &index) const
 Get the 3d index (x,y,z) of the cell based on the location of the cell.
uint64_t getIndexIn1D (const Eigen::Vector3i &index) const
 Given an index (x, y, z) in 3d, translate it into the index in 1d.
void getIndexIn3D (uint64_t index_1d, Eigen::Vector3i &index_3d) const
 Given an index in 1d, translate it into the index (x, y, z) in 3d.
void getNeighborList1D (Leaf leaf, Eigen::Vector3i &index3d, HashMap &neighbor_list)
 Given a voxel index, get all the neighbors indexes in 1D.
void getCellCenterFromIndex (const Eigen::Vector3i &index, Eigen::Vector4f &center) const
 Given the 3d index (x, y, z) of the cell, get the coordinates of the cell center.
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::MarchingCubes< PointNT >

The marching cubes surface reconstruction algorithm.

Author:
Gregory Long

Definition at line 358 of file marching_cubes.h.


Member Typedef Documentation

template<typename PointNT>
typedef boost::unordered_map<uint64_t, Leaf, boost::hash<uint64_t>, std::equal_to<uint64_t>, Eigen::aligned_allocator<uint64_t> > pcl::MarchingCubes< PointNT >::HashMap
template<typename PointNT>
typedef pcl::KdTree<PointNT> pcl::MarchingCubes< PointNT >::KdTree
template<typename PointNT>
typedef pcl::KdTree<PointNT>::Ptr pcl::MarchingCubes< PointNT >::KdTreePtr
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::MarchingCubes< PointNT >::PointCloudPtr

Reimplemented from pcl::PCLBase< PointNT >.

Reimplemented in pcl::MarchingCubesGreedy< PointNT >, and pcl::MarchingCubesGreedyDot< PointNT >.

Definition at line 364 of file marching_cubes.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::MarchingCubes< PointNT >::MarchingCubes ( )

Constructor.

Definition at line 47 of file marching_cubes.hpp.

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

Destructor.

Definition at line 53 of file marching_cubes.hpp.


Member Function Documentation

template<typename PointNT>
void pcl::MarchingCubes< PointNT >::getCellCenterFromIndex ( const Eigen::Vector3i &  index,
Eigen::Vector4f &  center 
) const [inline]

Given the 3d index (x, y, z) of the cell, get the coordinates of the cell center.

Parameters:
indexthe output 3d index
centerthe resultant cell center

Definition at line 455 of file marching_cubes.h.

template<typename PointNT>
void pcl::MarchingCubes< PointNT >::getCellIndex ( const Eigen::Vector4f &  p,
Eigen::Vector3i &  index 
) const [inline]

Get the 3d index (x,y,z) of the cell based on the location of the cell.

Parameters:
pthe coordinate of the input point
indexthe output 3d index

Definition at line 409 of file marching_cubes.h.

template<typename PointNT>
uint64_t pcl::MarchingCubes< PointNT >::getIndexIn1D ( const Eigen::Vector3i &  index) const [inline]

Given an index (x, y, z) in 3d, translate it into the index in 1d.

Parameters:
indexthe index of the cell in (x,y,z) 3d format

Definition at line 420 of file marching_cubes.h.

template<typename PointNT>
void pcl::MarchingCubes< PointNT >::getIndexIn3D ( uint64_t  index_1d,
Eigen::Vector3i &  index_3d 
) const [inline]

Given an index in 1d, translate it into the index (x, y, z) in 3d.

Parameters:
index_1dthe input 1d index
index_3dthe output 3d index

Definition at line 433 of file marching_cubes.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 >
void pcl::MarchingCubes< PointNT >::getNeighborList1D ( Leaf  leaf,
Eigen::Vector3i &  index3d,
HashMap neighbor_list 
)

Given a voxel index, get all the neighbors indexes in 1D.

    

Definition at line 199 of file marching_cubes.hpp.

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

Get a pointer to the search method used.

Definition at line 82 of file reconstruction.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::MarchingCubes< PointNT >::setIsoLevel ( float  iso_level) [inline]

set the iso level.

Parameters:
iso_levelthe iso level.

Definition at line 398 of file marching_cubes.h.

template<typename PointNT>
void pcl::MarchingCubes< PointNT >::setLeafSize ( double  leaf_size) [inline]

set the voxel size.

Parameters:
[in]leaf_sizethe size of the voxel

Definition at line 389 of file marching_cubes.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: