| 75 | } |
| 76 | |
| 77 | bool |
| 78 | loadTrainedFeatures (std::vector<FeatureT::Ptr> &out, |
| 79 | const pcl_fs::path &base_dir) |
| 80 | { |
| 81 | if (!pcl_fs::exists (base_dir) && !pcl_fs::is_directory (base_dir)) |
| 82 | return false; |
| 83 | |
| 84 | for (pcl_fs::directory_iterator it (base_dir); it != pcl_fs::directory_iterator (); ++it) |
| 85 | { |
| 86 | if (!pcl_fs::is_directory (it->status ()) && |
| 87 | it->path ().extension ().string () == ".pcd") |
| 88 | { |
| 89 | const std::string path = it->path ().string (); |
| 90 | |
| 91 | print_highlight ("Loading %s \n", path.c_str ()); |
| 92 | |
| 93 | FeatureT::Ptr features (new FeatureT); |
| 94 | if (loadPCDFile (path, *features) < 0) |
| 95 | return false; |
| 96 | |
| 97 | out.push_back (features); |
| 98 | } |
| 99 | } |
| 100 | return true; |
| 101 | } |
| 102 | |
| 103 | bool |
| 104 | loadCloud (const std::string &filename, CloudT::Ptr &cloud) |
no test coverage detected