Point Cloud Library (PCL)
1.15.1-dev
pcl
search
auto.h
1
/*
2
* SPDX-License-Identifier: BSD-3-Clause
3
*
4
* Point Cloud Library (PCL) - www.pointclouds.org
5
* Copyright (c) 2025-, Open Perception Inc.
6
*
7
* All rights reserved
8
*/
9
10
#pragma once
11
12
#include <pcl/point_cloud.h>
13
#include <pcl/search/search.h>
14
15
namespace
pcl
{
16
namespace
search {
17
enum class
Purpose
: std::uint32_t {
18
undefined
= 0,
///< Default value, for general-purpose search method
19
radius_search
= 1,
///< The search method will mainly be used for radiusSearch
20
one_knn_search
= 2,
///< The search method will mainly be used for nearestKSearch where k is 1
21
many_knn_search
= 4
///< The search method will mainly be used for nearestKSearch where k is larger than 1
22
};
23
24
/**
25
* Automatically select the fastest search method for the given point cloud. Make sure to delete the returned object after use!
26
* \param[in] cloud Point cloud, this function will pass it to the search method via setInputCloud
27
* \param[in] sorted_results Whether the search method should always return results sorted by distance (may be slower than unsorted)
28
* \param[in] purpose Optional, can be used to give more information about what this search method will be used for, to achieve optimal performance
29
*/
30
template
<
typename
Po
int
T>
31
pcl::search::Search<PointT>
*
autoSelectMethod
(
const
typename
pcl::PointCloud<PointT>::ConstPtr
& cloud,
bool
sorted_results,
Purpose
purpose =
Purpose::undefined
);
32
}
// namespace search
33
}
// namespace pcl
34
35
#ifdef PCL_NO_PRECOMPILE
36
#include <pcl/search/impl/auto.hpp>
37
#endif
pcl::PointCloud::ConstPtr
shared_ptr< const PointCloud< PointT > > ConstPtr
Definition:
point_cloud.h:415
pcl::search::Search
Generic search class.
Definition:
search.h:75
pcl::search::Purpose
Purpose
Definition:
auto.h:17
pcl::search::Purpose::undefined
@ undefined
Default value, for general-purpose search method.
pcl::search::Purpose::one_knn_search
@ one_knn_search
The search method will mainly be used for nearestKSearch where k is 1.
pcl::search::Purpose::radius_search
@ radius_search
The search method will mainly be used for radiusSearch.
pcl::search::Purpose::many_knn_search
@ many_knn_search
The search method will mainly be used for nearestKSearch where k is larger than 1.
pcl::search::autoSelectMethod
pcl::search::Search< PointT > * autoSelectMethod(const typename pcl::PointCloud< PointT >::ConstPtr &cloud, bool sorted_results, Purpose purpose=Purpose::undefined)
Automatically select the fastest search method for the given point cloud.
Definition:
auto.hpp:21
pcl
Definition:
convolution.h:46