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

Function batchProcess

tools/local_max.cpp:118–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118int
119batchProcess (const std::vector<std::string> &pcd_files, std::string &output_dir,
120 float radius)
121{
122 for (const auto &pcd_file : pcd_files)
123 {
124 // Load the first file
125 Cloud::Ptr cloud (new Cloud);
126 if (!loadCloud (pcd_file, *cloud))
127 return (-1);
128
129 // Perform the feature estimation
130 Cloud output;
131 compute (cloud, output, radius);
132
133 // Prepare output file name
134 std::string filename = pcl_fs::path(pcd_file).filename().string();
135
136 // Save into the second file
137 const std::string filepath = output_dir + '/' + filename;
138 saveCloud (filepath, output);
139 }
140 return (0);
141}
142
143
144/* ---[ */

Callers 1

mainFunction · 0.70

Calls 3

loadCloudFunction · 0.70
computeFunction · 0.70
saveCloudFunction · 0.70

Tested by

no test coverage detected