10 #ifndef PCL_SEARCH_AUTO_IMPL_HPP_
11 #define PCL_SEARCH_AUTO_IMPL_HPP_
13 #include <pcl/common/utils.h>
14 #include <pcl/search/auto.h>
15 #include <pcl/search/brute_force.h>
16 #include <pcl/search/kdtree.h>
17 #include <pcl/search/kdtree_nanoflann.h>
18 #include <pcl/search/octree.h>
19 #include <pcl/search/organized.h>
21 template<
typename Po
intT>
24 if constexpr (pcl::traits::has_xyz_v<PointT>) {
36 searcher =
new pcl::search::KdTreeNanoflann<PointT, pcl::DefaultPointRepresentation<PointT>::NR_DIMS> (sorted_results, (purpose ==
pcl::search::Purpose::one_knn_search ? 10 : 20));
53 if constexpr (pcl::traits::has_xyz_v<PointT>) {
63 if constexpr (pcl::traits::has_xyz_v<PointT>) {
68 PCL_ERROR(
"[pcl::search::autoSelectMethod] No suitable method found. Make sure you have nanoflann and/or FLANN installed.\n");
72 #define PCL_INSTANTIATE_AutoSelectMethod(T) template PCL_EXPORTS pcl::search::Search<T> * pcl::search::autoSelectMethod<T>(const typename pcl::PointCloud<T>::ConstPtr& cloud, const pcl::IndicesConstPtr& indices, bool sorted_results, pcl::search::Purpose purpose);
bool isOrganized() const
Return whether a dataset is organized (e.g., arranged in a structured grid).
shared_ptr< const PointCloud< PointT > > ConstPtr
Implementation of a simple brute force search algorithm.
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
search::Octree is a wrapper class which implements nearest neighbor search operations based on the pc...
OrganizedNeighbor is a class for optimized nearest neighbor search in organized projectable point clo...
virtual bool setInputCloud(const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr())
Pass the input dataset that the search will be performed on.
virtual void setSortedResults(bool sorted)
sets whether the results should be sorted (ascending in the distance) or not
@ one_knn_search
The search method will mainly be used for nearestKSearch where k is 1.
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.
void ignore(const T &...)
Utility function to eliminate unused variable warnings.
shared_ptr< const Indices > IndicesConstPtr