Manage all your point cloud data in one place with cloudparse. An CMake library to handle point cloud into the Point Cloud Library.
This library provides an design pattern interface to read data from external files into a pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud
Format | Description |
---|---|
.pcd | Point Cloud Data file format |
.ply | Polygon file format |
.txt | Text file format |
.xyz | X Y Z Text file format |
Include parser.hpp and you're good to go.
#include <cloudparse/parser.hpp>
To start parsing point cloud data, create an ParserCloudFile
.
CloudParserLibrary::ParserCloudFile cloud_parser;
Load point cloud data into a pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>());
cloud_parser.load_cloudfile(path/to/cloud/data, cloud);
cloud->width = (int)cloud->points.size();
cloud->height = 1;
cloud->is_dense = true;
Print point cloud data
for (const auto& point: *cloud){
std::cout << " " << point.x
<< " " << point.y
<< " " << point.z << std::endl;
}
The project is available under the MIT license.