39 #ifndef PCL_SEARCH_FLANN_SEARCH_H_
40 #define PCL_SEARCH_FLANN_SEARCH_H_
42 #include <pcl/search/search.h>
43 #include <pcl/common/time.h>
44 #include <pcl/point_representation.h>
49 template<
typename T>
struct L2;
66 template<
typename Po
intT,
typename FlannDistance=flann::L2_Simple <
float> >
72 typedef boost::shared_ptr<std::vector<int> > IndicesPtr;
73 typedef boost::shared_ptr<const std::vector<int> > IndicesConstPtr;
75 typedef boost::shared_ptr<flann::NNIndex <FlannDistance > > IndexPtr;
76 typedef boost::shared_ptr<flann::Matrix <float> > MatrixPtr;
77 typedef boost::shared_ptr<const flann::Matrix <float> > MatrixConstPtr;
81 typedef boost::shared_ptr<const PointRepresentation> PointRepresentationConstPtr;
88 typedef boost::shared_ptr<FlannSearch<PointT, FlannDistance> >
Ptr;
89 typedef boost::shared_ptr<const FlannSearch<PointT, FlannDistance> >
ConstPtr;
103 virtual IndexPtr
createIndex (MatrixConstPtr data)=0;
129 virtual IndexPtr
createIndex (MatrixConstPtr data);
131 unsigned int max_leaf_size_;
152 virtual IndexPtr
createIndex (MatrixConstPtr data);
198 nearestKSearch (
const PointT &point,
int k, std::vector<int> &k_indices, std::vector<float> &k_sqr_distances)
const;
210 std::vector< std::vector<int> >& k_indices, std::vector< std::vector<float> >& k_sqr_distances)
const;
224 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances,
225 unsigned int max_nn = 0)
const;
236 radiusSearch (
const PointCloud& cloud,
const std::vector<int>& indices,
double radius, std::vector< std::vector<int> >& k_indices,
237 std::vector< std::vector<float> >& k_sqr_distances,
unsigned int max_nn=0)
const;
246 dim_ = point_representation->getNumberOfDimensions ();
252 inline PointRepresentationConstPtr
const
292 #define PCL_INSTANTIATE_FlannSearch(T) template class PCL_EXPORTS pcl::search::FlannSearch<T>;
294 #endif // PCL_SEARCH_KDTREE_H_