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

Method loadFilePCD

apps/point_cloud_editor/src/cloudEditorWidget.cpp:546–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546void
547CloudEditorWidget::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
578void
579CloudEditorWidget::initFileLoadMap()

Callers

nothing calls this directly

Calls 3

setHighlightPointSizeMethod · 0.80
clearFunction · 0.50
setPointSizeMethod · 0.45

Tested by

no test coverage detected