MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / batchProcess

Function batchProcess

tools/morph.cpp:139–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139int
140batchProcess (const std::vector<std::string> &pcd_files, std::string &output_dir,
141 float resolution, const std::string &method)
142{
143 for (const auto &pcd_file : pcd_files)
144 {
145 // Load the first file
146 Cloud::Ptr cloud (new Cloud);
147 if (!loadCloud (pcd_file, *cloud))
148 return (-1);
149
150 // Perform the feature estimation
151 Cloud output;
152 compute (cloud, output, resolution, method);
153
154 // Prepare output file name
155 std::string filename = pcl_fs::path(pcd_file).filename().string();
156
157 // Save into the second file
158 const std::string filepath = output_dir + '/' + filename;
159 saveCloud (filepath, output);
160 }
161 return (0);
162}
163
164
165/* ---[ */

Callers 1

mainFunction · 0.70

Calls 3

loadCloudFunction · 0.70
computeFunction · 0.70
saveCloudFunction · 0.70

Tested by

no test coverage detected