Public Types | Public Member Functions

pcl::search::Search< PointT > Class Template Reference

Generic search class. More...

#include </tmp/pcl-1.3.1/search/include/pcl/search/search.h>

Inheritance diagram for pcl::search::Search< PointT >:
Inheritance graph
[legend]

List of all members.

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).

Detailed Description

template<typename PointT>
class pcl::search::Search< PointT >

Generic search class.

All search wrappers must inherit from this.

Definition at line 52 of file search.h.


Member Typedef Documentation

template<typename PointT>
typedef boost::shared_ptr<const pcl::search::Search<PointT> > pcl::search::Search< PointT >::ConstPtr
template<typename PointT>
typedef boost::shared_ptr<const std::vector<int> > pcl::search::Search< PointT >::IndicesConstPtr
template<typename PointT>
typedef boost::shared_ptr<std::vector<int> > pcl::search::Search< PointT >::IndicesPtr
template<typename PointT>
typedef pcl::PointCloud<PointT> pcl::search::Search< PointT >::PointCloud
template<typename PointT>
typedef PointCloud::ConstPtr pcl::search::Search< PointT >::PointCloudConstPtr
template<typename PointT>
typedef PointCloud::Ptr pcl::search::Search< PointT >::PointCloudPtr
template<typename PointT>
typedef boost::shared_ptr<pcl::search::Search<PointT> > pcl::search::Search< PointT >::Ptr

Constructor & Destructor Documentation

template<typename PointT>
pcl::search::Search< PointT >::Search (  )  [inline]

Constructor.

Definition at line 66 of file search.h.

template<typename PointT>
virtual pcl::search::Search< PointT >::~Search (  )  [inline, virtual]

Destructor.

Definition at line 72 of file search.h.


Member Function Documentation

template<typename PointT>
virtual IndicesConstPtr const pcl::search::Search< PointT >::getIndices (  )  [inline, virtual]

Get a pointer to the vector of indices used.

Reimplemented in pcl::search::AutotunedSearch< PointT >, pcl::search::KdTree< PointT >, and pcl::search::Octree< PointT, LeafTWrap, OctreeT >.

Definition at line 95 of file search.h.

template<typename PointT>
virtual PointCloudConstPtr pcl::search::Search< PointT >::getInputCloud (  )  [pure virtual]
template<typename PointT>
virtual int pcl::search::Search< PointT >::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).

Parameters:
[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!)
Returns:
number of neighbors found

Implemented in pcl::search::AutotunedSearch< PointT >, pcl::search::KdTree< PointT >, pcl::search::Octree< PointT, LeafTWrap, OctreeT >, and pcl::search::OrganizedNeighbor< PointT >.

template<typename PointT>
virtual int pcl::search::Search< PointT >::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.

Parameters:
[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!)
Returns:
number of neighbors found

Implemented in pcl::search::AutotunedSearch< PointT >, pcl::search::KdTree< PointT >, pcl::search::Octree< PointT, LeafTWrap, OctreeT >, and pcl::search::OrganizedNeighbor< PointT >.

template<typename PointT>
virtual int pcl::search::Search< PointT >::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.

Parameters:
[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!)
Returns:
number of neighbors found

Implemented in pcl::search::AutotunedSearch< PointT >, pcl::search::KdTree< PointT >, and pcl::search::Octree< PointT, LeafTWrap, OctreeT >.

template<typename PointT>
template<typename PointTDiff >
int pcl::search::Search< PointT >::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.

Parameters:
[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!)
Returns:
number of neighbors found

Definition at line 118 of file search.h.

template<typename PointT>
virtual int pcl::search::Search< PointT >::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.

Parameters:
[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
Returns:
number of neighbors found in radius

Implemented in pcl::search::AutotunedSearch< PointT >, pcl::search::KdTree< PointT >, pcl::search::Octree< PointT, LeafTWrap, OctreeT >, and pcl::search::OrganizedNeighbor< PointT >.

template<typename PointT>
virtual int pcl::search::Search< PointT >::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.

Parameters:
[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
Returns:
number of neighbors found in radius

Implemented in pcl::search::AutotunedSearch< PointT >, pcl::search::KdTree< PointT >, and pcl::search::Octree< PointT, LeafTWrap, OctreeT >.

template<typename PointT>
virtual int pcl::search::Search< PointT >::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).

Parameters:
[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
Returns:
number of neighbors found in radius

Implemented in pcl::search::AutotunedSearch< PointT >, pcl::search::KdTree< PointT >, pcl::search::Octree< PointT, LeafTWrap, OctreeT >, and pcl::search::OrganizedNeighbor< PointT >.

template<typename PointT>
template<typename PointTDiff >
int pcl::search::Search< PointT >::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.

Parameters:
[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
Returns:
number of neighbors found in radius

Definition at line 177 of file search.h.

template<typename PointT>
virtual void pcl::search::Search< PointT >::setInputCloud ( const PointCloudConstPtr cloud,
const IndicesConstPtr indices 
) [inline, virtual]

Pass the input dataset that the search will be performed on.

Parameters:
[in] cloud a const pointer to the PointCloud data
[in] indices the point indices subset that is to be used from the cloud

Definition at line 81 of file search.h.

template<typename PointT>
virtual void pcl::search::Search< PointT >::setInputCloud ( const PointCloudConstPtr cloud  )  [pure virtual]

Pass the input dataset that the search will be performed on.

Parameters:
[in] cloud a const pointer to the PointCloud data

The documentation for this class was generated from the following file: