Point Cloud Library (PCL)
1.3.1
|
Generic search class. More...
#include </builddir/build/BUILD/PCL-1.3.1-Source/search/include/pcl/search/search.h>
Public Types | |
typedef pcl::PointCloud< PointT > | PointCloud |
typedef PointCloud::Ptr | PointCloudPtr |
typedef PointCloud::ConstPtr | PointCloudConstPtr |
typedef boost::shared_ptr < pcl::search::Search< PointT > > | Ptr |
typedef boost::shared_ptr < const pcl::search::Search < PointT > > | ConstPtr |
typedef boost::shared_ptr < std::vector< int > > | IndicesPtr |
typedef boost::shared_ptr < const std::vector< int > > | IndicesConstPtr |
Public Member Functions | |
Search () | |
Constructor. | |
virtual | ~Search () |
Destructor. | |
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 PointCloudConstPtr | getInputCloud ()=0 |
Get a pointer to the input point cloud dataset. | |
virtual IndicesConstPtr const | getIndices () |
Get a pointer to the vector of indices used. | |
virtual int | nearestKSearch (const PointT &point, 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. | |
template<typename PointTDiff > | |
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 | 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. | |
virtual int | nearestKSearch (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 (zero-copy). | |
virtual int | radiusSearch (const PointT &point, const double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=-1) const =0 |
Search for all the nearest neighbors of the query point in a given radius. | |
template<typename PointTDiff > | |
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. | |
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. | |
virtual int | radiusSearch (int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=-1) const =0 |
search for all the nearest neighbors of the query point in a given radius (zero-copy). |
Generic search class.
All search wrappers must inherit from this.
typedef boost::shared_ptr<const pcl::search::Search<PointT> > pcl::search::Search::ConstPtr |
Reimplemented in pcl::search::Octree, and pcl::search::KdTree.
typedef boost::shared_ptr<const std::vector<int> > pcl::search::Search::IndicesConstPtr |
Reimplemented in pcl::search::AutotunedSearch, and pcl::search::Octree.
typedef boost::shared_ptr<std::vector<int> > pcl::search::Search::IndicesPtr |
Reimplemented in pcl::search::AutotunedSearch, and pcl::search::Octree.
typedef pcl::PointCloud<PointT> pcl::search::Search::PointCloud |
Reimplemented in pcl::search::Octree, and pcl::search::AutotunedSearch.
Reimplemented in pcl::search::Octree, and pcl::search::AutotunedSearch.
Reimplemented in pcl::search::Octree, and pcl::search::AutotunedSearch.
typedef boost::shared_ptr<pcl::search::Search<PointT> > pcl::search::Search::Ptr |
Reimplemented in pcl::search::Octree, and pcl::search::KdTree.
virtual pcl::search::Search::~Search | ( | ) | [inline, virtual] |
virtual IndicesConstPtr const pcl::search::Search::getIndices | ( | ) | [inline, virtual] |
Get a pointer to the vector of indices used.
Reimplemented in pcl::search::KdTree, pcl::search::Octree, and pcl::search::AutotunedSearch.
virtual PointCloudConstPtr pcl::search::Search::getInputCloud | ( | ) | [pure virtual] |
Get a pointer to the input point cloud dataset.
Implemented in pcl::search::KdTree, pcl::search::Octree, pcl::search::AutotunedSearch, and pcl::search::OrganizedNeighbor.
virtual int pcl::search::Search::nearestKSearch | ( | const PointT & | point, |
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_sqr_distances | ||
) | [pure 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_sqr_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Implemented in pcl::search::Octree, pcl::search::OrganizedNeighbor, pcl::search::KdTree, and pcl::search::AutotunedSearch.
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] |
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.
virtual int pcl::search::Search::nearestKSearch | ( | int | index, |
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_sqr_distances | ||
) | [pure 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_sqr_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Implemented in pcl::search::KdTree, pcl::search::Octree, pcl::search::OrganizedNeighbor, and pcl::search::AutotunedSearch.
int pcl::search::Search::nearestKSearchT | ( | const PointTDiff & | point, |
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_sqr_distances | ||
) | [inline] |
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 PointT & | point, |
const double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = -1 |
||
) | const [pure 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 |
Implemented in pcl::search::OrganizedNeighbor, pcl::search::Octree, pcl::search::KdTree, and pcl::search::AutotunedSearch.
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] |
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.
virtual int pcl::search::Search::radiusSearch | ( | int | index, |
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = -1 |
||
) | const [pure 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 |
Implemented in pcl::search::KdTree, pcl::search::Octree, pcl::search::AutotunedSearch, and pcl::search::OrganizedNeighbor.
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] |
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 |
virtual void pcl::search::Search::setInputCloud | ( | const PointCloudConstPtr & | cloud, |
const IndicesConstPtr & | indices | ||
) | [inline, virtual] |
Pass the input dataset that the search will be performed on.
[in] | cloud | a const pointer to the PointCloud data |
[in] | indices | the point indices subset that is to be used from the cloud |
virtual void pcl::search::Search::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) | [pure virtual] |
Pass the input dataset that the search will be performed on.
[in] | cloud | a const pointer to the PointCloud data |