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

Method run

apps/src/openni_octree_compression.cpp:205–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203 }
204
205 void
206 run()
207 {
208 // create a new grabber for OpenNI devices
209 pcl::OpenNIGrabber interface;
210
211 // make callback function from member function
212 std::function<void(const pcl::PointCloud<pcl::PointXYZRGBA>::ConstPtr&)> f =
213 [this](const pcl::PointCloud<pcl::PointXYZRGBA>::ConstPtr& cloud) {
214 cloud_cb_(cloud);
215 };
216
217 // connect callback function for desired signal. In this case its a point cloud with
218 // color values
219 boost::signals2::connection c = interface.registerCallback(f);
220
221 // start receiving point clouds
222 interface.start();
223
224 while (!outputFile_.fail()) {
225 std::this_thread::sleep_for(1s);
226 }
227
228 interface.stop();
229 }
230
231 pcl::PassThrough<PointXYZRGBA> pass_;
232 ostream& outputFile_;

Callers 1

mainFunction · 0.45

Calls 4

cloud_cb_Function · 0.50
registerCallbackMethod · 0.45
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected