38 #ifndef PCL_SEARCH_KDTREE_IMPL_HPP_
39 #define PCL_SEARCH_KDTREE_IMPL_HPP_
41 #include <pcl/search/kdtree.h>
42 #include <pcl/search/impl/search.hpp>
45 template <
typename Po
intT>
53 template <
typename Po
intT>
void
57 tree_->setPointRepresentation (point_representation);
61 template <
typename Po
intT>
void
64 sorted_results_ = sorted_results;
65 tree_->setSortedResults (sorted_results);
69 template <
typename Po
intT>
void
72 tree_->setEpsilon (eps);
76 template <
typename Po
intT>
void
81 tree_->setInputCloud (cloud, indices);
87 template <
typename Po
intT>
int
89 const PointT &point,
int k, std::vector<int> &k_indices,
90 std::vector<float> &k_sqr_distances)
const
92 return (tree_->nearestKSearch (point, k, k_indices, k_sqr_distances));
96 template <
typename Po
intT>
int
98 const PointT& point,
double radius,
99 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances,
100 unsigned int max_nn)
const
102 return (tree_->radiusSearch (point, radius, k_indices, k_sqr_distances, max_nn));
105 #define PCL_INSTANTIATE_KdTree(T) template class PCL_EXPORTS pcl::search::KdTree<T>;
107 #endif //#ifndef _PCL_SEARCH_KDTREE_IMPL_HPP_
KdTreeFLANN is a generic type of 3D spatial locator using kD-tree structures.
int nearestKSearch(const PointT &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const
Search for the k-nearest neighbors for the given query point.
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a pointer to the point representation to use to convert points into k-D vectors.
boost::shared_ptr< const PointRepresentation< PointT > > PointRepresentationConstPtr
Search< PointT >::PointCloudConstPtr PointCloudConstPtr
KdTree(bool sorted=true)
Constructor for KdTree.
void setSortedResults(bool sorted_results)
Sets whether the results have to be sorted or not.
int radiusSearch(const PointT &point, double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const
Search for all the nearest neighbors of the query point in a given radius.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setEpsilon(float eps)
Set the search epsilon precision (error bound) for nearest neighbors searches.
void setInputCloud(const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr())
Provide a pointer to the input dataset.