38 #ifndef PCL_STANDALONE_MARCHING_CUBES_H_ 39 #define PCL_STANDALONE_MARCHING_CUBES_H_ 44 #include <pcl/io/pcd_io.h> 45 #include <pcl/io/ply_io.h> 46 #include <pcl/io/vtk_io.h> 50 #include <pcl/pcl_macros.h> 53 #include <pcl/gpu/kinfu_large_scale/marching_cubes.h> 54 #include <pcl/PolygonMesh.h> 56 #include <pcl/gpu/containers/device_array.h> 59 #include <pcl/gpu/kinfu_large_scale/tsdf_volume.h> 62 #include <pcl/common/transforms.h> 63 #include <Eigen/Geometry> 77 template <
typename Po
intT>
83 typedef boost::shared_ptr<pcl::PolygonMesh>
MeshPtr;
105 getMeshesFromTSDFVector (
const std::vector<PointCloudPtr> &tsdf_clouds,
const std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > &tsdf_offsets);
153 std::vector<int> tsdf_volume_cpu_;
171 #define PCL_INSTANTIATE_StandaloneMarchingCubes(PointT) template class PCL_EXPORTS pcl::gpu::kinfuLS::StandaloneMarchingCubes<PointT>; 173 #endif // PCL_STANDALONE_MARCHING_CUBES_H_ void convertTsdfVectors(const PointCloud &cloud, std::vector< int > &output)
Read the data in the point cloud.
std::vector< int > & tsdfVolumeCPU()
Returns the associated Tsdf Volume buffer in CPU.
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.
boost::shared_ptr< pcl::PolygonMesh > MeshPtr
The Standalone Marching Cubes Class provides encapsulated functionality for the Marching Cubes implem...
pcl::PointCloud< PointT > PointCloud
boost::shared_ptr< PointCloud< PointT > > Ptr
Defines all the PCL implemented PointT point type structures.
~StandaloneMarchingCubes()
Destructor.
pcl::PointCloud< PointT >::Ptr PointCloudPtr
boost::shared_ptr< TsdfVolume > Ptr
PointCloud represents the base class in PCL for storing collections of 3D points. ...
MeshPtr getMeshFromTSDFCloud(const PointCloud &cloud)
Run marching cubes in a TSDF cloud and returns a PolygonMesh.
MeshPtr convertTrianglesToMesh(const pcl::gpu::DeviceArray< pcl::PointXYZ > &triangles)
Converts the triangles buffer device to a PolygonMesh.
TsdfVolume::Ptr tsdfVolumeGPU()
Returns the associated Tsdf Volume buffer in GPU.
MeshPtr runMarchingCubes()
Runs marching cubes on the data that is contained in the TSDF Volume in GPU.
void loadTsdfCloudToGPU(const PointCloud &cloud)
Loads a TSDF Cloud to the TSDF Volume in GPU.
StandaloneMarchingCubes(int voxels_x=512, int voxels_y=512, int voxels_z=512, float volume_size=3.0f)
Constructor