40 #ifndef PCL_SEARCH_KDTREE_H_
41 #define PCL_SEARCH_KDTREE_H_
43 #include <pcl/search/search.h>
44 #include <pcl/kdtree/kdtree_flann.h>
49 template <
typename T>
class PointRepresentation;
61 template<
typename Po
intT>
79 typedef boost::shared_ptr<KdTree<PointT> >
Ptr;
80 typedef boost::shared_ptr<const KdTree<PointT> >
ConstPtr;
93 KdTree (
bool sorted =
true);
111 return (
tree_->getPointRepresentation ());
130 return (
tree_->getEpsilon ());
151 std::vector<int> &k_indices,
152 std::vector<float> &k_sqr_distances)
const;
166 std::vector<int> &k_indices,
167 std::vector<float> &k_sqr_distances,
168 unsigned int max_nn = 0)
const;
176 #define PCL_INSTANTIATE_KdTree(T) template class PCL_EXPORTS pcl::search::KdTree<T>;
178 #endif // PCL_SEARCH_KDTREE_H_
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< const pcl::KdTreeFLANN< PointT > > KdTreeFLANNConstPtr
int nearestKSearch(const PointT &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const
Search for the k-nearest neighbors for the given query point.
boost::shared_ptr< pcl::KdTreeFLANN< PointT > > KdTreeFLANNPtr
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
KdTreeFLANNPtr tree_
A pointer to the internal KdTreeFLANN object.
boost::shared_ptr< std::vector< int > > IndicesPtr
Search< PointT >::PointCloud PointCloud
virtual ~KdTree()
Destructor for KdTree.
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a pointer to the point representation to use to convert points into k-D vectors.
boost::shared_ptr< const PointRepresentation< PointT > > PointRepresentationConstPtr
PointRepresentationConstPtr getPointRepresentation() const
Get a pointer to the point representation used when converting points into k-D vectors.
boost::shared_ptr< const KdTree< PointT > > ConstPtr
float getEpsilon() const
Get the search epsilon precision (error bound) for nearest neighbors searches.
boost::shared_ptr< KdTree< PointT > > Ptr
Search< PointT >::PointCloudConstPtr PointCloudConstPtr
KdTree(bool sorted=true)
Constructor for KdTree.
void setSortedResults(bool sorted_results)
Sets whether the results have to be sorted or not.
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
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.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setEpsilon(float eps)
Set the search epsilon precision (error bound) for nearest neighbors searches.
void setInputCloud(const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr())
Provide a pointer to the input dataset.