Point Cloud Library (PCL)
1.3.1
|
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search functions using KdTree structure. More...
#include </builddir/build/BUILD/PCL-1.3.1-Source/search/include/pcl/search/kdtree.h>
Public Types | |
typedef boost::shared_ptr < KdTree< PointT > > | Ptr |
typedef boost::shared_ptr < const KdTree< PointT > > | ConstPtr |
typedef boost::shared_ptr < pcl::KdTreeFLANN< PointT > > | KdTreeFLANNPtr |
typedef boost::shared_ptr < const pcl::KdTreeFLANN < PointT > > | KdTreeFLANNConstPtr |
typedef PointCloud::Ptr | PointCloudPtr |
Public Member Functions | |
KdTree (bool sorted=true) | |
Constructor for KdTree. | |
virtual | ~KdTree () |
Destructor for KdTree. | |
void | setEpsilon (double eps) |
Set the search epsilon precision (error bound) for nearest neighbors searches. | |
double | getEpsilon () |
Get the search epsilon precision (error bound) for nearest neighbors searches. | |
void | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices) |
Provide a pointer to the input dataset. | |
void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. | |
PointCloudConstPtr | getInputCloud () |
Get a pointer to the input dataset as passed by the user. | |
virtual IndicesConstPtr const | getIndices () |
Get a pointer to the set of input indices used as passed by the user. | |
int | nearestKSearch (const PointT &point, int k, std::vector< int > &k_indices, std::vector< float > &k_distances) |
Search for the k-nearest neighbors for the given query point. | |
int | nearestKSearch (const PointCloud &cloud, int index, int k, std::vector< int > &k_indices, std::vector< float > &k_distances) |
Search for the k-nearest neighbors for the given query point. | |
int | nearestKSearch (int index, int k, std::vector< int > &k_indices, std::vector< float > &k_distances) |
Search for the k-nearest neighbors for the given query point (zero-copy). | |
int | radiusSearch (const PointT &point, double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=-1) const |
Search for all the nearest neighbors of the query point in a given radius. | |
int | radiusSearch (const PointCloud &cloud, int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=-1) |
Search for all the nearest neighbors of the query point in a given radius. | |
int | radiusSearch (int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=-1) const |
Search for all the nearest neighbors of the query point in a given radius (zero-copy). | |
virtual void | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices) |
Pass the input dataset that the search will be performed on. | |
virtual void | setInputCloud (const PointCloudConstPtr &cloud)=0 |
Pass the input dataset that the search will be performed on. | |
virtual int | nearestKSearch (const PointCloud &cloud, int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)=0 |
Search for the k-nearest neighbors for the given query point. | |
int | nearestKSearchT (const PointTDiff &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) |
Search for the k-nearest neighbors for the given query point. | |
virtual int | radiusSearch (const PointCloud &cloud, int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=-1)=0 |
Search for all the nearest neighbors of the query point in a given radius. | |
int | radiusSearchT (const PointTDiff &point, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=-1) |
Search for all the nearest neighbors of the query point in a given radius. |
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search functions using KdTree structure.
KdTree is a generic type of 3D spatial locator using kD-tree structures. The class is making use of the FLANN (Fast Library for Approximate Nearest Neighbor) project by Marius Muja and David Lowe.
typedef boost::shared_ptr<const KdTree<PointT> > pcl::search::KdTree::ConstPtr |
Reimplemented from pcl::search::Search< PointT >.
typedef boost::shared_ptr<const pcl::KdTreeFLANN<PointT> > pcl::search::KdTree::KdTreeFLANNConstPtr |
typedef boost::shared_ptr<pcl::KdTreeFLANN<PointT> > pcl::search::KdTree::KdTreeFLANNPtr |
typedef PointCloud::Ptr pcl::search::Search::PointCloudPtr [inherited] |
Reimplemented in pcl::search::Octree, and pcl::search::AutotunedSearch.
typedef boost::shared_ptr<KdTree<PointT> > pcl::search::KdTree::Ptr |
Reimplemented from pcl::search::Search< PointT >.
pcl::search::KdTree::KdTree | ( | bool | sorted = true | ) | [inline] |
virtual pcl::search::KdTree::~KdTree | ( | ) | [inline, virtual] |
double pcl::search::KdTree::getEpsilon | ( | ) | [inline] |
virtual IndicesConstPtr const pcl::search::KdTree::getIndices | ( | ) | [inline, virtual] |
Get a pointer to the set of input indices used as passed by the user.
Reimplemented from pcl::search::Search< PointT >.
PointCloudConstPtr pcl::search::KdTree::getInputCloud | ( | ) | [inline, virtual] |
Get a pointer to the input dataset as passed by the user.
Implements pcl::search::Search< PointT >.
virtual int pcl::search::Search::nearestKSearch | ( | const PointCloud & | cloud, |
int | index, | ||
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_sqr_distances | ||
) | [pure virtual, inherited] |
Search for the k-nearest neighbors for the given query point.
[in] | cloud | the point cloud data |
[in] | index | the index in cloud representing the query point |
[in] | k | the number of neighbors to search for |
[out] | k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) |
[out] | k_sqr_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Implemented in pcl::search::OrganizedNeighbor, pcl::search::AutotunedSearch, and pcl::search::Octree.
int pcl::search::KdTree::nearestKSearch | ( | const PointT & | point, |
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances | ||
) | [inline, virtual] |
Search for the k-nearest neighbors for the given query point.
[in] | point | the given query point |
[in] | k | the number of neighbors to search for |
[out] | k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) |
[out] | k_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Implements pcl::search::Search< PointT >.
int pcl::search::KdTree::nearestKSearch | ( | const PointCloud & | cloud, |
int | index, | ||
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances | ||
) | [inline] |
Search for the k-nearest neighbors for the given query point.
[in] | cloud | the point cloud data |
[in] | index | the index in cloud representing the query point |
[in] | k | the number of neighbors to search for |
[out] | k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) |
[out] | k_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
int pcl::search::KdTree::nearestKSearch | ( | int | index, |
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances | ||
) | [inline, virtual] |
Search for the k-nearest neighbors for the given query point (zero-copy).
[in] | index | the index representing the query point in the dataset given by setInputCloud if indices were given in setInputCloud, index will be the position in the indices vector |
[in] | k | the number of neighbors to search for |
[out] | k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) |
[out] | k_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Implements pcl::search::Search< PointT >.
int pcl::search::Search::nearestKSearchT | ( | const PointTDiff & | point, |
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_sqr_distances | ||
) | [inline, inherited] |
Search for the k-nearest neighbors for the given query point.
[in] | point | the given query point |
[in] | k | the number of neighbors to search for |
[out] | k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) |
[out] | k_sqr_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
virtual int pcl::search::Search::radiusSearch | ( | const PointCloud & | cloud, |
int | index, | ||
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = -1 |
||
) | [pure virtual, inherited] |
Search for all the nearest neighbors of the query point in a given radius.
[in] | cloud | the point cloud data |
[in] | index | the index in cloud representing the query point |
[in] | radius | the radius of the sphere bounding all of p_q's neighbors |
[out] | k_indices | the resultant indices of the neighboring points |
[out] | k_distances | the resultant squared distances to the neighboring points |
[in] | max_nn | if given, bounds the maximum returned neighbors to this value |
Implemented in pcl::search::AutotunedSearch, pcl::search::OrganizedNeighbor, and pcl::search::Octree.
int pcl::search::KdTree::radiusSearch | ( | const PointT & | point, |
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_sqr_distances, | ||
int | max_nn = -1 |
||
) | const [inline, virtual] |
Search for all the nearest neighbors of the query point in a given radius.
[in] | point | the given query point |
[in] | radius | the radius of the sphere bounding all of p_q's neighbors |
[out] | k_indices | the resultant indices of the neighboring points |
[out] | k_distances | the resultant squared distances to the neighboring points |
[in] | max_nn | if given, bounds the maximum returned neighbors to this value |
Implements pcl::search::Search< PointT >.
int pcl::search::KdTree::radiusSearch | ( | const PointCloud & | cloud, |
int | index, | ||
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = -1 |
||
) | [inline] |
Search for all the nearest neighbors of the query point in a given radius.
[in] | cloud | the point cloud data |
[in] | index | the index in cloud representing the query point |
[in] | radius | the radius of the sphere bounding all of p_q's neighbors |
[out] | k_indices | the resultant indices of the neighboring points |
[out] | k_distances | the resultant squared distances to the neighboring points |
[in] | max_nn | if given, bounds the maximum returned neighbors to this value |
int pcl::search::KdTree::radiusSearch | ( | int | index, |
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = -1 |
||
) | const [inline, virtual] |
Search for all the nearest neighbors of the query point in a given radius (zero-copy).
[in] | index | the index representing the query point in the dataset given by setInputCloud if indices were given in setInputCloud, index will be the position in the indices vector |
[in] | radius | the radius of the sphere bounding all of p_q's neighbors |
[out] | k_indices | the resultant indices of the neighboring points |
[out] | k_distances | the resultant squared distances to the neighboring points |
[in] | max_nn | if given, bounds the maximum returned neighbors to this value |
Implements pcl::search::Search< PointT >.
int pcl::search::Search::radiusSearchT | ( | const PointTDiff & | point, |
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = -1 |
||
) | [inline, inherited] |
Search for all the nearest neighbors of the query point in a given radius.
[in] | point | the given query point |
[in] | radius | the radius of the sphere bounding all of p_q's neighbors |
[out] | k_indices | the resultant indices of the neighboring points |
[out] | k_distances | the resultant squared distances to the neighboring points |
[in] | max_nn | if given, bounds the maximum returned neighbors to this value |
void pcl::search::KdTree::setEpsilon | ( | double | eps | ) | [inline] |
virtual void pcl::search::Search::setInputCloud | ( | const PointCloudConstPtr & | cloud, |
const IndicesConstPtr & | indices | ||
) | [inline, virtual, inherited] |
virtual void pcl::search::Search::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) | [pure virtual, inherited] |
Pass the input dataset that the search will be performed on.
[in] | cloud | a const pointer to the PointCloud data |
void pcl::search::KdTree::setInputCloud | ( | const PointCloudConstPtr & | cloud, |
const IndicesConstPtr & | indices | ||
) | [inline] |
Provide a pointer to the input dataset.
cloud | the const boost shared pointer to a PointCloud message |
indices | the point indices subset that is to be used from cloud |
void pcl::search::KdTree::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) | [inline] |
Provide a pointer to the input dataset.
cloud | the const boost shared pointer to a PointCloud message |