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

Method load

apps/src/pcd_select_object_plane.cpp:600–627  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

598
599 /////////////////////////////////////////////////////////////////////////
600 bool
601 load(const std::string& file)
602 {
603 // Load the input file
604 TicToc tt;
605 tt.tic();
606 print_highlight(stderr, "Loading ");
607 print_value(stderr, "%s ", file.c_str());
608 cloud_.reset(new PointCloud<PointT>);
609 if (io::loadPCDFile(file, *cloud_) < 0) {
610 print_error(stderr, "[error]\n");
611 return false;
612 }
613 print_info("[done, ");
614 print_value("%g", tt.toc());
615 print_info(" ms : ");
616 print_value("%lu", cloud_->size());
617 print_info(" points]\n");
618
619 if (cloud_->isOrganized())
620 search_.reset(new search::OrganizedNeighbor<PointT>);
621 else
622 search_.reset(new search::KdTree<PointT>);
623
624 search_->setInputCloud(cloud_);
625
626 return true;
627 }
628
629 /////////////////////////////////////////////////////////////////////////
630 void

Callers 1

mainFunction · 0.45

Calls 8

print_valueFunction · 0.85
loadPCDFileFunction · 0.85
ticMethod · 0.80
tocMethod · 0.80
isOrganizedMethod · 0.80
resetMethod · 0.45
sizeMethod · 0.45
setInputCloudMethod · 0.45

Tested by

no test coverage detected