Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
pcl::MarchingCubes< PointNT > Class Template Referenceabstract

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]

Public Types

typedef pcl::PointCloud
< PointNT >::Ptr 
PointCloudPtr
 
typedef pcl::KdTree< PointNT > KdTree
 
typedef pcl::KdTree< PointNT >::Ptr KdTreePtr
 
typedef pcl::PointCloud< PointNT > PointCloud
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef PointIndices::Ptr PointIndicesPtr
 
typedef PointIndices::ConstPtr PointIndicesConstPtr
 

Public Member Functions

 MarchingCubes ()
 Constructor. More...
 
 ~MarchingCubes ()
 Destructor. More...
 
void setIsoLevel (float iso_level)
 Method that sets the iso level of the surface to be extracted. More...
 
float getIsoLevel ()
 Method that returns the iso level of the surface to be extracted. More...
 
void setGridResolution (int res_x, int res_y, int res_z)
 Method that sets the marching cubes grid resolution. More...
 
void getGridResolution (int &res_x, int &res_y, int &res_z)
 Method to get the marching cubes grid resolution. More...
 
void setPercentageExtendGrid (float percentage)
 Method that sets the parameter that defines how much free space should be left inside the grid between the bounding box of the point cloud and the grid limits. More...
 
float getPercentageExtendGrid ()
 Method that gets the parameter that defines how much free space should be left inside the grid between the bounding box of the point cloud and the grid limits, as a percentage of the bounding box. More...
 
virtual void reconstruct (pcl::PolygonMesh &output)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> More...
 
virtual void reconstruct (pcl::PointCloud< PointNT > &points, std::vector< pcl::Vertices > &polygons)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> More...
 
void setSearchMethod (const KdTreePtr &tree)
 Provide an optional pointer to a search object. More...
 
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset. More...
 
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
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. More...
 
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used. More...
 
const PointNT & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code. More...
 

Detailed Description

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

The marching cubes surface reconstruction algorithm.

This is an abstract class that takes a grid and extracts the isosurface as a mesh, based on the original marching cubes paper:

Lorensen W.E., Cline H.E., "Marching cubes: A high resolution 3d surface construction algorithm", SIGGRAPH '87

Author
Alexandru E. Ichim

Definition at line 363 of file marching_cubes.h.

Member Typedef Documentation

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

Definition at line 371 of file marching_cubes.h.

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

Definition at line 372 of file marching_cubes.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::MarchingCubes< PointNT >::PointCloudPtr

Definition at line 369 of file marching_cubes.h.

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 54 of file marching_cubes.hpp.

Member Function Documentation

template<typename PointNT >
void pcl::MarchingCubes< PointNT >::getGridResolution ( int &  res_x,
int &  res_y,
int &  res_z 
)
inline

Method to get the marching cubes grid resolution.

Parameters
[in]res_xthe resolution of the grid along the x-axis
[in]res_ythe resolution of the grid along the y-axis
[in]res_zthe resolution of the grid along the z-axis

Definition at line 410 of file marching_cubes.h.

IndicesPtr const pcl::PCLBase< PointNT >::getIndices ( )
inlineinherited

Get a pointer to the vector of indices used.

Definition at line 190 of file pcl_base.h.

PointCloudConstPtr const pcl::PCLBase< PointNT >::getInputCloud ( )
inlineinherited

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointNT >
float pcl::MarchingCubes< PointNT >::getIsoLevel ( )
inline

Method that returns the iso level of the surface to be extracted.

Definition at line 391 of file marching_cubes.h.

template<typename PointNT >
float pcl::MarchingCubes< PointNT >::getPercentageExtendGrid ( )
inline

Method that gets the parameter that defines how much free space should be left inside the grid between the bounding box of the point cloud and the grid limits, as a percentage of the bounding box.

Definition at line 427 of file marching_cubes.h.

KdTreePtr pcl::PCLSurfaceBase< PointNT >::getSearchMethod ( )
inlineinherited

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)
inlineinherited

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)
virtualinherited

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 
)
virtualinherited

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.
template<typename PointNT >
void pcl::MarchingCubes< PointNT >::setGridResolution ( int  res_x,
int  res_y,
int  res_z 
)
inline

Method that sets the marching cubes grid resolution.

Parameters
[in]res_xthe resolution of the grid along the x-axis
[in]res_ythe resolution of the grid along the y-axis
[in]res_zthe resolution of the grid along the z-axis

Definition at line 400 of file marching_cubes.h.

void pcl::PCLBase< PointNT >::setIndices ( const IndicesPtr indices)
inlineinherited

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)
inlineinherited

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)
inlineinherited

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 
)
inlineinherited

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)
inlinevirtualinherited

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

Method that sets the iso level of the surface to be extracted.

Parameters
[in]iso_levelthe iso level.

Definition at line 386 of file marching_cubes.h.

template<typename PointNT >
void pcl::MarchingCubes< PointNT >::setPercentageExtendGrid ( float  percentage)
inline

Method that sets the parameter that defines how much free space should be left inside the grid between the bounding box of the point cloud and the grid limits.

Does not affect the resolution of the grid, it just changes the voxel size accordingly.

Parameters
[in]percentagethe percentage of the bounding box that should be left empty between the bounding box and the grid limits.

Definition at line 420 of file marching_cubes.h.

void pcl::PCLSurfaceBase< PointNT >::setSearchMethod ( const KdTreePtr tree)
inlineinherited

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: