Point Cloud Library (PCL)
1.9.1
|
41 #ifndef PCL_KDTREE_KDTREE_FLANN_H_
42 #define PCL_KDTREE_KDTREE_FLANN_H_
44 #include <pcl/kdtree/kdtree.h>
45 #include <pcl/kdtree/flann.h>
47 #include <boost/shared_array.hpp>
54 template <
typename T>
class Index;
60 template <
typename T>
class PointRepresentation;
68 template <
typename Po
intT,
typename Dist = ::flann::L2_Simple<
float> >
89 typedef boost::shared_ptr<KdTreeFLANN<PointT, Dist> >
Ptr;
90 typedef boost::shared_ptr<const KdTreeFLANN<PointT, Dist> >
ConstPtr;
111 flann_index_ = k.flann_index_;
113 index_mapping_ = k.index_mapping_;
114 identity_mapping_ = k.identity_mapping_;
116 total_nr_points_ = k.total_nr_points_;
117 param_k_ = k.param_k_;
118 param_radius_ = k.param_radius_;
164 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances)
const;
184 std::vector<float> &k_sqr_distances,
unsigned int max_nn = 0)
const;
196 convertCloudToArray (
const PointCloud &cloud);
204 convertCloudToArray (
const PointCloud &cloud,
const std::vector<int> &indices);
209 getName ()
const {
return (
"KdTreeFLANN"); }
212 boost::shared_ptr<FLANNIndex> flann_index_;
215 boost::shared_array<float> cloud_;
218 std::vector<int> index_mapping_;
221 bool identity_mapping_;
227 int total_nr_points_;
230 ::flann::SearchParams param_k_;
233 ::flann::SearchParams param_radius_;
237 #ifdef PCL_NO_PRECOMPILE
238 #include <pcl/kdtree/impl/kdtree_flann.hpp>
This file defines compatibility wrappers for low level I/O functions.
KdTree represents the base spatial locator class for kd-tree implementations.
KdTree< PointT >::PointCloudConstPtr PointCloudConstPtr
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.
::flann::Index< Dist > FLANNIndex
virtual ~KdTreeFLANN()
Destructor for KdTreeFLANN.
PointCloud represents the base class in PCL for storing collections of 3D points.
boost::shared_ptr< KdTreeFLANN< PointT, Dist > > Ptr
boost::shared_ptr< KdTree< FeatureT > > Ptr
A point structure representing Euclidean xyz coordinates, and the RGB color.
KdTreeFLANN< PointT, Dist > & operator=(const KdTreeFLANN< PointT, Dist > &k)
Copy operator.
void setInputCloud(const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr())
Provide a pointer to the input dataset.
void setEpsilon(float eps)
Set the search epsilon precision (error bound) for nearest neighbors searches.
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 k-nearest neighbors for the given query point.
KdTree< PointT >::PointCloud PointCloud
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
boost::shared_ptr< std::vector< int > > IndicesPtr
boost::shared_ptr< const KdTreeFLANN< PointT, Dist > > ConstPtr
KdTreeFLANN(bool sorted=true)
Default Constructor for KdTreeFLANN.
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
void setSortedResults(bool sorted)