Point Cloud Library (PCL)
1.14.1-dev
|
The Standalone Marching Cubes Class provides encapsulated functionality for the Marching Cubes implementation originally by Anatoly Baksheev. More...
#include </__w/1/s/gpu/kinfu_large_scale/include/pcl/gpu/kinfu_large_scale/standalone_marching_cubes.h>
Public Types | |
using | PointCloud = pcl::PointCloud< PointT > |
using | PointCloudPtr = typename PointCloud::Ptr |
using | MeshPtr = pcl::PolygonMesh::Ptr |
Public Member Functions | |
StandaloneMarchingCubes (int voxels_x=512, int voxels_y=512, int voxels_z=512, float volume_size=3.0f) | |
Constructor More... | |
MeshPtr | getMeshFromTSDFCloud (const PointCloud &cloud) |
Run marching cubes in a TSDF cloud and returns a PolygonMesh. More... | |
void | getMeshesFromTSDFVector (const std::vector< PointCloudPtr > &tsdf_clouds, const std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > &tsdf_offsets) |
Runs marching cubes on every pointcloud in the vector. More... | |
TsdfVolume::Ptr | tsdfVolumeGPU () |
Returns the associated Tsdf Volume buffer in GPU. More... | |
std::vector< int > & | tsdfVolumeCPU () |
Returns the associated Tsdf Volume buffer in CPU. More... | |
Protected Member Functions | |
void | loadTsdfCloudToGPU (const PointCloud &cloud) |
Loads a TSDF Cloud to the TSDF Volume in GPU. More... | |
void | convertTsdfVectors (const PointCloud &cloud, std::vector< int > &output) |
Read the data in the point cloud. More... | |
MeshPtr | convertTrianglesToMesh (const pcl::gpu::DeviceArray< pcl::PointXYZ > &triangles) |
Converts the triangles buffer device to a PolygonMesh. More... | |
MeshPtr | runMarchingCubes () |
Runs marching cubes on the data that is contained in the TSDF Volume in GPU. More... | |
The Standalone Marching Cubes Class provides encapsulated functionality for the Marching Cubes implementation originally by Anatoly Baksheev.
Definition at line 77 of file standalone_marching_cubes.h.
using pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::MeshPtr = pcl::PolygonMesh::Ptr |
Definition at line 82 of file standalone_marching_cubes.h.
using pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::PointCloud = pcl::PointCloud<PointT> |
Definition at line 80 of file standalone_marching_cubes.h.
using pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::PointCloudPtr = typename PointCloud::Ptr |
Definition at line 81 of file standalone_marching_cubes.h.
pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::StandaloneMarchingCubes | ( | int | voxels_x = 512 , |
int | voxels_y = 512 , |
||
int | voxels_z = 512 , |
||
float | volume_size = 3.0f |
||
) |
Constructor
Creating GPU TSDF Volume instance
Creating CPU TSDF Volume instance
Definition at line 46 of file standalone_marching_cubes.hpp.
|
protected |
Converts the triangles buffer device to a PolygonMesh.
[in] | triangles | the triangles buffer containing the points of the mesh |
Definition at line 218 of file standalone_marching_cubes.hpp.
References pcl::gpu::DeviceArray< T >::download(), pcl::gpu::DeviceMemory::empty(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::points, pcl::gpu::DeviceArray< T >::size(), pcl::toPCLPointCloud2(), pcl::Vertices::vertices, and pcl::PointCloud< PointT >::width.
|
protected |
Read the data in the point cloud.
Performs a conversion to a suitable format for the TSDF Volume. Loads the converted data to the output vector.
[in] | cloud | point cloud to be converted |
[out] | output | the vector of converted values, ready to be loaded to the GPU. |
For every point in the cloud
Calculate the index to write to
Definition at line 189 of file standalone_marching_cubes.hpp.
References pcl::PointCloud< PointT >::size().
void pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::getMeshesFromTSDFVector | ( | const std::vector< PointCloudPtr > & | tsdf_clouds, |
const std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > & | tsdf_offsets | ||
) |
Runs marching cubes on every pointcloud in the vector.
Returns a vector containing the PolygonMeshes.
[in] | tsdf_clouds | Vector of TSDF Clouds |
[in] | tsdf_offsets | Vector of the offsets for every pointcloud in TsdfClouds. This offset (in indices) indicates the position of the cloud with respect to the absolute origin of the world model |
Definition at line 94 of file standalone_marching_cubes.hpp.
References pcl::fromPCLPointCloud2(), pcl::io::savePLYFile(), pcl::toPCLPointCloud2(), and pcl::transformPointCloud().
pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::MeshPtr pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::getMeshFromTSDFCloud | ( | const PointCloud & | cloud | ) |
Run marching cubes in a TSDF cloud and returns a PolygonMesh.
Input X,Y,Z coordinates must be in indices of the TSDF volume grid, output is in meters.
[in] | cloud | TSDF cloud with indices between [0 ... VOXELS_X][0 ... VOXELS_Y][0 ... VOXELS_Z]. Intensity value corresponds to the TSDF value in that coordinate. |
Definition at line 70 of file standalone_marching_cubes.hpp.
|
protected |
Loads a TSDF Cloud to the TSDF Volume in GPU.
[in] | cloud | TSDF cloud that will be loaded. X,Y,Z of the cloud will only be loaded if their range is between [0 ... VOXELS_X][0 ... VOXELS_Y][0 ... VOXELS_Z] |
Definition at line 176 of file standalone_marching_cubes.hpp.
|
protected |
Runs marching cubes on the data that is contained in the TSDF Volume in GPU.
Definition at line 249 of file standalone_marching_cubes.hpp.
References pcl::fromPCLPointCloud2().
std::vector< int > & pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::tsdfVolumeCPU |
Returns the associated Tsdf Volume buffer in CPU.
Definition at line 168 of file standalone_marching_cubes.hpp.
pcl::gpu::kinfuLS::TsdfVolume::Ptr pcl::gpu::kinfuLS::StandaloneMarchingCubes< PointT >::tsdfVolumeGPU |
Returns the associated Tsdf Volume buffer in GPU.
Definition at line 160 of file standalone_marching_cubes.hpp.