42#include <pcl/search/search.h>
43#include <pcl/kdtree/kdtree_flann.h>
60 template<
typename Po
intT,
class Tree = pcl::KdTreeFLANN<Po
intT> >
75 using Ptr = shared_ptr<KdTree<PointT, Tree> >;
76 using ConstPtr = shared_ptr<const KdTree<PointT, Tree> >;
105 return (
tree_->getPointRepresentation ());
124 return (
tree_->getEpsilon ());
146 std::vector<float> &k_sqr_distances)
const override;
161 std::vector<float> &k_sqr_distances,
162 unsigned int max_nn = 0)
const override;
165 KdTree (
const std::string& name,
bool sorted);
172#ifdef PCL_NO_PRECOMPILE
173#include <pcl/search/impl/kdtree.hpp>
175#define PCL_INSTANTIATE_KdTree(T) template class PCL_EXPORTS pcl::search::KdTree<T>;
PointRepresentation provides a set of methods for converting a point structs/object into an n-dimensi...
shared_ptr< const PointRepresentation< PointT > > ConstPtr
typename pcl::KdTreeFLANN< PointTarget >::ConstPtr KdTreeConstPtr
int nearestKSearch(const PointTarget &point, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override
void setEpsilon(float eps)
Set the search epsilon precision (error bound) for nearest neighbors searches.
PointRepresentationConstPtr getPointRepresentation() const
Get a pointer to the point representation used when converting points into k-D vectors.
shared_ptr< KdTree< PointTarget, pcl::KdTreeFLANN< PointTarget > > > Ptr
float getEpsilon() const
Get the search epsilon precision (error bound) for nearest neighbors searches.
shared_ptr< const KdTree< PointTarget, pcl::KdTreeFLANN< PointTarget > > > ConstPtr
KdTree(const std::string &name, bool sorted)
This leaves the internal tree_ object uninitialized!
void setSortedResults(bool sorted_results) override
Sets whether the results have to be sorted or not.
~KdTree() override=default
Destructor for KdTree.
typename Search< PointTarget >::PointCloudConstPtr PointCloudConstPtr
typename PointRepresentation< PointTarget >::ConstPtr PointRepresentationConstPtr
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a pointer to the point representation to use to convert points into k-D vectors.
bool setInputCloud(const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr()) override
Provide a pointer to the input dataset.
KdTree(bool sorted=true)
Constructor for KdTree.
typename pcl::KdTreeFLANN< PointTarget >::Ptr KdTreePtr
int radiusSearch(const PointTarget &point, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override
typename Search< PointTarget >::PointCloud PointCloud
virtual IndicesConstPtr getIndices() const
Get a pointer to the vector of indices used.
PointCloudConstPtr input_
typename PointCloud::ConstPtr PointCloudConstPtr
Search(const std::string &name="", bool sorted=false)
Constructor.
pcl::IndicesConstPtr IndicesConstPtr
pcl::PointCloud< PointT > PointCloud
virtual PointCloudConstPtr getInputCloud() const
Get a pointer to the input point cloud dataset.
IndicesAllocator<> Indices
Type used for indices in PCL.