| 544 | } |
| 545 | |
| 546 | void |
| 547 | CloudEditorWidget::loadFilePCD(const std::string &filename) |
| 548 | { |
| 549 | PclCloudPtr pcl_cloud_ptr; |
| 550 | Cloud3D tmp; |
| 551 | if (pcl::io::loadPCDFile<Point3D>(filename, tmp) == -1) |
| 552 | throw; |
| 553 | pcl_cloud_ptr = PclCloudPtr(new Cloud3D(tmp)); |
| 554 | pcl::Indices index; |
| 555 | pcl::removeNaNFromPointCloud(*pcl_cloud_ptr, *pcl_cloud_ptr, index); |
| 556 | Statistics::clear(); |
| 557 | cloud_ptr_ = CloudPtr(new Cloud(*pcl_cloud_ptr, true)); |
| 558 | selection_ptr_ = SelectionPtr(new Selection(cloud_ptr_, true)); |
| 559 | copy_buffer_ptr_ = CopyBufferPtr(new CopyBuffer(true)); |
| 560 | cloud_ptr_->setPointSize(point_size_); |
| 561 | cloud_ptr_->setHighlightPointSize(selected_point_size_); |
| 562 | tool_ptr_ = |
| 563 | std::shared_ptr<CloudTransformTool>(new CloudTransformTool(cloud_ptr_)); |
| 564 | |
| 565 | if (isColored(filename)) |
| 566 | { |
| 567 | swapRBValues(); |
| 568 | color_scheme_ = COLOR_BY_RGB; |
| 569 | is_colored_ = true; |
| 570 | } |
| 571 | else |
| 572 | { |
| 573 | color_scheme_ = COLOR_BY_Z; |
| 574 | is_colored_ = false; |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | void |
| 579 | CloudEditorWidget::initFileLoadMap() |
nothing calls this directly
no test coverage detected