Point Cloud Library (PCL)
1.11.1-dev
|
43 #include <pcl/kdtree/kdtree.h>
44 #include <flann/util/params.h>
52 template <
typename T>
class Index;
63 template <
typename Po
intT,
typename Dist = ::flann::L2_Simple<
float> >
84 using Ptr = shared_ptr<KdTreeFLANN<PointT, Dist> >;
85 using ConstPtr = shared_ptr<const KdTreeFLANN<PointT, Dist> >;
106 flann_index_ = k.flann_index_;
108 index_mapping_ = k.index_mapping_;
109 identity_mapping_ = k.identity_mapping_;
111 total_nr_points_ = k.total_nr_points_;
112 param_k_ = k.param_k_;
113 param_radius_ = k.param_radius_;
159 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances)
const override;
179 std::vector<float> &k_sqr_distances,
unsigned int max_nn = 0)
const override;
191 convertCloudToArray (
const PointCloud &cloud);
199 convertCloudToArray (
const PointCloud &cloud,
const std::vector<int> &indices);
204 getName ()
const override {
return (
"KdTreeFLANN"); }
207 std::shared_ptr<FLANNIndex> flann_index_;
210 std::shared_ptr<float> cloud_;
213 std::vector<int> index_mapping_;
216 bool identity_mapping_;
225 ::flann::SearchParams param_k_;
228 ::flann::SearchParams param_radius_;
232 #ifdef PCL_NO_PRECOMPILE
233 #include <pcl/kdtree/impl/kdtree_flann.hpp>
shared_ptr< const std::vector< int > > IndicesConstPtr
KdTree represents the base spatial locator class for kd-tree implementations.
shared_ptr< const KdTree< FeatureT > > ConstPtr
shared_ptr< const Indices > IndicesConstPtr
~KdTreeFLANN()
Destructor for KdTreeFLANN.
A point structure representing Euclidean xyz coordinates, and the RGB color.
shared_ptr< std::vector< int > > IndicesPtr
int nearestKSearch(const PointT &point, unsigned int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const override
Search for k-nearest neighbors for the given query point.
KdTreeFLANN< PointT, Dist > & operator=(const KdTreeFLANN< PointT, Dist > &k)
Copy operator.
KdTreeFLANN is a generic type of 3D spatial locator using kD-tree structures.
int radiusSearch(const PointT &point, double radius, std::vector< int > &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.
shared_ptr< KdTree< FeatureT > > Ptr
KdTreeFLANN(bool sorted=true)
Default Constructor for KdTreeFLANN.
void setEpsilon(float eps) override
Set the search epsilon precision (error bound) for nearest neighbors searches.
detail::int_type_t< detail::index_type_size, false > uindex_t
Type used for an unsigned index in PCL.
void setInputCloud(const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr()) override
Provide a pointer to the input dataset.
shared_ptr< KdTreeFLANN< PointT, Dist > > Ptr
void setSortedResults(bool sorted)
typename PointCloud::ConstPtr PointCloudConstPtr