Point Cloud Library (PCL)
1.11.1-dev
|
42 #include <pcl/search/search.h>
43 #include <pcl/kdtree/kdtree_flann.h>
48 template <
typename T>
class PointRepresentation;
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> >;
89 KdTree (
bool sorted =
true);
107 return (
tree_->getPointRepresentation ());
126 return (
tree_->getEpsilon ());
148 std::vector<float> &k_sqr_distances)
const override;
163 std::vector<float> &k_sqr_distances,
164 unsigned int max_nn = 0)
const override;
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>;
int nearestKSearch(const PointT &point, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override
Search for the k-nearest neighbors for the given query point.
void setInputCloud(const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr()) override
Provide a pointer to the input dataset.
shared_ptr< const Indices > IndicesConstPtr
shared_ptr< const PointRepresentation< PointT > > ConstPtr
int radiusSearch(const PointT &point, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override
Search for all the nearest neighbors of the query point in a given radius.
PointCloud represents the base class in PCL for storing collections of 3D points.
typename pcl::KdTreeFLANN< SceneT > ::Ptr KdTreePtr
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a pointer to the point representation to use to convert points into k-D vectors.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setSortedResults(bool sorted_results) override
Sets whether the results have to be sorted or not.
PointRepresentationConstPtr getPointRepresentation() const
Get a pointer to the point representation used when converting points into k-D vectors.
shared_ptr< KdTree< SceneT, pcl::KdTreeFLANN< SceneT > > > Ptr
float getEpsilon() const
Get the search epsilon precision (error bound) for nearest neighbors searches.
typename PointCloud::ConstPtr PointCloudConstPtr
typename pcl::KdTreeFLANN< SceneT > ::ConstPtr KdTreeConstPtr
typename PointRepresentation< SceneT >::ConstPtr PointRepresentationConstPtr
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
KdTree(bool sorted=true)
Constructor for KdTree.
KdTreePtr tree_
A pointer to the internal KdTree object.
~KdTree()
Destructor for KdTree.
IndicesAllocator<> Indices
Type used for indices in PCL.
shared_ptr< const KdTree< SceneT, pcl::KdTreeFLANN< SceneT > > > ConstPtr
typename Search< SceneT >::PointCloud PointCloud
typename PointCloud::ConstPtr PointCloudConstPtr
void setEpsilon(float eps)
Set the search epsilon precision (error bound) for nearest neighbors searches.