Point Cloud Library (PCL)
1.3.1
|
The marching cubes surface reconstruction algorithm. More...
#include <pcl/surface/marching_cubes.h>
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 < int, Leaf, boost::hash< int > , std::equal_to< int > , Eigen::aligned_allocator < int > > | HashMap |
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. | |
int | getIndexIn1D (const Eigen::Vector3i &index) const |
Given an index (x, y, z) in 3d, translate it into the index in 1d. | |
void | getIndexIn3D (int 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 ¢er) const |
Given the 3d index (x, y, z) of the cell, get the coordinates of the cell center. | |
void | performReconstruction (pcl::PolygonMesh &output) |
Create the surface. | |
void | reconstruct (pcl::PolygonMesh &output) |
Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> | |
void | setSearchMethod (const KdTreePtr &tree) |
Provide a pointer to the search object. | |
KdTreePtr | getSearchMethod () |
Get a pointer to the search method used. |
The marching cubes surface reconstruction algorithm.
typedef boost::unordered_map<int, Leaf, boost::hash<int>, std::equal_to<int>, Eigen::aligned_allocator<int> > pcl::MarchingCubes::HashMap |
Reimplemented in pcl::MarchingCubesGreedy, and pcl::MarchingCubesGreedyDot.
Definition at line 376 of file marching_cubes.h.
typedef pcl::KdTree<PointNT> pcl::MarchingCubes::KdTree |
Reimplemented from pcl::SurfaceReconstruction< PointNT >.
Reimplemented in pcl::MarchingCubesGreedy, and pcl::MarchingCubesGreedyDot.
Definition at line 366 of file marching_cubes.h.
typedef pcl::KdTree<PointNT>::Ptr pcl::MarchingCubes::KdTreePtr |
Reimplemented from pcl::SurfaceReconstruction< PointNT >.
Reimplemented in pcl::MarchingCubesGreedy, and pcl::MarchingCubesGreedyDot.
Definition at line 367 of file marching_cubes.h.
typedef pcl::PointCloud<PointNT>::Ptr pcl::MarchingCubes::PointCloudPtr |
Reimplemented in pcl::MarchingCubesGreedy, and pcl::MarchingCubesGreedyDot.
Definition at line 364 of file marching_cubes.h.
pcl::MarchingCubes::MarchingCubes | ( | ) |
Constructor.
Definition at line 47 of file marching_cubes.hpp.
pcl::MarchingCubes::~MarchingCubes | ( | ) |
Destructor.
Definition at line 52 of file marching_cubes.hpp.
void pcl::MarchingCubes::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.
index | the output 3d index |
center | the resultant cell center |
Definition at line 455 of file marching_cubes.h.
void pcl::MarchingCubes::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.
p | the coordinate of the input point |
index | the output 3d index |
Definition at line 409 of file marching_cubes.h.
int pcl::MarchingCubes::getIndexIn1D | ( | const Eigen::Vector3i & | index | ) | const [inline] |
Given an index (x, y, z) in 3d, translate it into the index in 1d.
index | the index of the cell in (x,y,z) 3d format |
Definition at line 420 of file marching_cubes.h.
void pcl::MarchingCubes::getIndexIn3D | ( | int | index_1d, |
Eigen::Vector3i & | index_3d | ||
) | const [inline] |
Given an index in 1d, translate it into the index (x, y, z) in 3d.
index_1d | the input 1d index |
index_3d | the output 3d index |
Definition at line 433 of file marching_cubes.h.
void pcl::MarchingCubes::getNeighborList1D | ( | Leaf | leaf, |
Eigen::Vector3i & | index3d, | ||
HashMap & | neighbor_list | ||
) |
Given a voxel index, get all the neighbors indexes in 1D.
Definition at line 190 of file marching_cubes.hpp.
KdTreePtr pcl::SurfaceReconstruction::getSearchMethod | ( | ) | [inline, inherited] |
Get a pointer to the search method used.
Definition at line 86 of file reconstruction.h.
void pcl::MarchingCubes::performReconstruction | ( | pcl::PolygonMesh & | output | ) | [virtual] |
Create the surface.
More details here.
output | the resultant polygonal mesh |
Implements pcl::SurfaceReconstruction< PointNT >.
Definition at line 280 of file marching_cubes.hpp.
void pcl::SurfaceReconstruction::reconstruct | ( | pcl::PolygonMesh & | output | ) | [inherited] |
Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>
output | the resultant reconstructed surface model |
void pcl::MarchingCubes::setIsoLevel | ( | float | iso_level | ) | [inline] |
set the iso level.
iso_level | the iso level. |
Definition at line 398 of file marching_cubes.h.
void pcl::MarchingCubes::setLeafSize | ( | double | leaf_size | ) | [inline] |
set the voxel size.
size | the size of the voxel |
Definition at line 389 of file marching_cubes.h.
void pcl::SurfaceReconstruction::setSearchMethod | ( | const KdTreePtr & | tree | ) | [inline, inherited] |
Provide a pointer to the search object.
tree | a pointer to the spatial search object. |
Definition at line 79 of file reconstruction.h.