load_clouds.h
Go to the documentation of this file.
00001 #ifndef IO_H_
00002 #define IO_H_
00003 
00004 #include "typedefs.h"
00005 
00006 #include <pcl/io/pcd_io.h>
00007   
00008 template <typename PointT>
00009 boost::shared_ptr<pcl::PointCloud<PointT> >
00010 loadPointCloud (std::string filename, std::string suffix)
00011 {
00012   boost::shared_ptr<pcl::PointCloud<PointT> > output (new pcl::PointCloud<PointT>);
00013   filename.append (suffix);
00014   pcl::io::loadPCDFile (filename, *output);
00015   pcl::console::print_info ("Loaded %s (%zu points)\n", filename.c_str (), output->size ());
00016   return (output);
00017 }
00018 
00019 PointCloudPtr
00020 loadPoints (std::string filename)
00021 {
00022   PointCloudPtr output (new PointCloud);
00023   filename.append ("_points.pcd");
00024   pcl::io::loadPCDFile (filename, *output);
00025   pcl::console::print_info ("Loaded %s (%zu points)\n", filename.c_str (), output->size ());
00026   return (output);
00027 }
00028 
00029 SurfaceNormalsPtr
00030 loadSurfaceNormals(std::string filename)
00031 {
00032   SurfaceNormalsPtr output (new SurfaceNormals);
00033   filename.append ("_normals.pcd");
00034   pcl::io::loadPCDFile (filename, *output);
00035   pcl::console::print_info ("Loaded %s (%zu points)\n", filename.c_str (), output->size ());
00036   return (output);
00037 }
00038 
00039 PointCloudPtr
00040 loadKeypoints (std::string filename)
00041 {
00042   PointCloudPtr output (new PointCloud);
00043   filename.append ("_keypoints.pcd");
00044   pcl::io::loadPCDFile (filename, *output);
00045   pcl::console::print_info ("Loaded %s (%zu points)\n", filename.c_str (), output->size ());
00046   return (output);
00047 }
00048 
00049 LocalDescriptorsPtr
00050 loadLocalDescriptors (std::string filename)
00051 {
00052   LocalDescriptorsPtr output (new LocalDescriptors);
00053   filename.append ("_localdesc.pcd");
00054   pcl::io::loadPCDFile (filename, *output);
00055   pcl::console::print_info ("Loaded %s (%zu points)\n", filename.c_str (), output->size ());
00056   return (output);
00057 }
00058 
00059 GlobalDescriptorsPtr
00060 loadGlobalDescriptors (std::string filename)
00061 {
00062   GlobalDescriptorsPtr output (new GlobalDescriptors);
00063   filename.append ("_globaldesc.pcd");
00064   pcl::io::loadPCDFile (filename, *output);
00065   pcl::console::print_info ("Loaded %s (%zu points)\n", filename.c_str (), output->size ());
00066   return (output);
00067 }
00068 
00069 
00070 #endif


pcl
Author(s): Open Perception
autogenerated on Mon Oct 6 2014 03:15:38