42 #include <pcl/filters/filter_indices.h>
43 #include <pcl/search/search.h>
72 template<
typename Po
intT>
83 using Ptr = shared_ptr<RadiusOutlierRemoval<PointT> >;
84 using ConstPtr = shared_ptr<const RadiusOutlierRemoval<PointT> >;
105 search_radius_ = radius;
116 return (search_radius_);
127 min_pts_radius_ = min_pts;
138 return (min_pts_radius_);
156 num_threads_ = nr_threads != 0 ? nr_threads : omp_get_num_procs();
158 if (num_threads_ != 1) {
159 PCL_WARN(
"OpenMP is not available. Keeping number of threads unchanged at 1\n");
196 double search_radius_{0.0};
199 int min_pts_radius_{1};
234 filter_name_ =
"RadiusOutlierRemoval";
243 search_radius_ = radius;
250 return (search_radius_);
260 min_pts_radius_ = min_pts;
269 return (min_pts_radius_);
274 double search_radius_{0.0};
279 int min_pts_radius_{1};
292 #ifdef PCL_NO_PRECOMPILE
293 #include <pcl/filters/impl/radius_outlier_removal.hpp>
Filter represents the base filter class.
shared_ptr< Filter< PointT > > Ptr
shared_ptr< const Filter< PointT > > ConstPtr
std::string filter_name_
The filter name.
FilterIndices represents the base class for filters that are about binary point removal.
PCLPointCloud2::Ptr PCLPointCloud2Ptr
PCLPointCloud2::ConstPtr PCLPointCloud2ConstPtr
typename PointCloud::Ptr PointCloudPtr
typename PointCloud::ConstPtr PointCloudConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
double getRadiusSearch() const
Get the sphere radius used for determining the k-nearest neighbors.
void applyFilter(Indices &indices) override
Abstract filter method for point cloud indices.
void setRadiusSearch(double radius)
Set the sphere radius that is to be used for determining the k-nearest neighbors for filtering.
KdTreePtr searcher_
A pointer to the spatial search object.
double getMinNeighborsInRadius() const
Get the minimum number of neighbors that a point needs to have in the given search radius to be consi...
RadiusOutlierRemoval(bool extract_removed_indices=false)
Empty constructor.
void applyFilter(PCLPointCloud2 &output) override
Abstract filter method for point cloud.
void setMinNeighborsInRadius(int min_pts)
Set the minimum number of neighbors that a point needs to have in the given search radius in order to...
RadiusOutlierRemoval filters points in a cloud based on the number of neighbors they have.
void applyFilterIndices(Indices &indices)
Filtered results are indexed by an indices array.
void applyFilter(Indices &indices) override
Filtered results are indexed by an indices array.
double getRadiusSearch() const
Get the radius of the sphere that will determine which points are neighbors.
void setMinNeighborsInRadius(int min_pts)
Set the number of neighbors that need to be present in order to be classified as an inlier.
void setRadiusSearch(double radius)
Set the radius of the sphere that will determine which points are neighbors.
int getMinNeighborsInRadius() const
Get the number of neighbors that need to be present in order to be classified as an inlier.
RadiusOutlierRemoval(bool extract_removed_indices=false)
Constructor.
typename pcl::search::Search< PointT >::Ptr SearcherPtr
void setSearchMethod(const SearcherPtr &searcher)
Provide a pointer to the search object.
void setNumberOfThreads(unsigned int nr_threads=0)
Set the number of threads to use.
shared_ptr< pcl::search::Search< PointT > > Ptr
Defines all the PCL implemented PointT point type structures.
IndicesAllocator<> Indices
Type used for indices in PCL.
shared_ptr< ::pcl::PCLPointCloud2 > Ptr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.