////////////////////////////////////////////////////////////////////
| 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 |
no test coverage detected