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

Method execute

apps/point_cloud_editor/src/denoiseCommand.cpp:46–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#include <pcl/apps/point_cloud_editor/cloud.h>
45
46void
47DenoiseCommand::execute ()
48{
49 Cloud3D temp_cloud;
50 // denoise
51 // uses point neighborhood statistics to filter outlier data.
52 // For a more detailed explanation, see PCL's tutorial on denoising:
53 // http://pointclouds.org/documentation/tutorials/statistical_outlier.php
54 pcl::StatisticalOutlierRemoval<Point3D> filter(true);
55 filter.setInputCloud(cloud_ptr_->getInternalCloud().makeShared());
56 filter.setMeanK(mean_);
57 filter.setStddevMulThresh (threshold_);
58 // filtering and back up
59 filter.setNegative(false);
60 filter.filter(temp_cloud);
61 // back up the removed indices.
62 pcl::IndicesConstPtr indices_ptr = filter.getRemovedIndices();
63 for(const auto &it : *indices_ptr)
64 removed_indices_.addIndex(static_cast<unsigned int>(it));
65 // back up the removed points.
66 removed_points_.set(cloud_ptr_, removed_indices_);
67 // remove the noisy points.
68 cloud_ptr_->remove(removed_indices_);
69 selection_ptr_->clear();
70}
71
72void
73DenoiseCommand::undo ()

Callers

nothing calls this directly

Calls 11

setMeanKMethod · 0.80
setStddevMulThreshMethod · 0.80
setNegativeMethod · 0.80
getRemovedIndicesMethod · 0.80
addIndexMethod · 0.80
setInputCloudMethod · 0.45
makeSharedMethod · 0.45
filterMethod · 0.45
setMethod · 0.45
removeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected