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> >
Ptr;
90 typedef boost::shared_ptr<const KdTreeFLANN<PointT> >
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_;
126 setEpsilon (
float eps);
129 setSortedResults (
bool sorted);
146 setInputCloud (
const PointCloudConstPtr &cloud,
const IndicesConstPtr &indices = IndicesConstPtr ());
163 nearestKSearch (
const PointT &point,
int k,
164 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances)
const;
183 radiusSearch (
const PointT &point,
double radius, std::vector<int> &k_indices,
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> KdTreeFLANN is a generic type of 3D spatial locator using kD-tree structures.
virtual ~KdTreeFLANN()
Destructor for KdTreeFLANN.
boost::shared_ptr< std::vector< int > > IndicesPtr
KdTree< PointT >::PointCloud PointCloud
::flann::Index< Dist > FLANNIndex
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
KdTree< PointT >::PointCloudConstPtr PointCloudConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.
KdTree represents the base spatial locator class for kd-tree implementations.
boost::shared_ptr< KdTreeFLANN< PointT > > Ptr
boost::shared_ptr< const KdTreeFLANN< PointT > > ConstPtr