Point Cloud Library (PCL)  1.3.1
Public Types | Public Member Functions
pcl::search::OrganizedNeighbor Class Reference

OrgfanizedNeighbor is a class for optimized nearest neigbhor search in organized point clouds. More...

#include </builddir/build/BUILD/PCL-1.3.1-Source/search/include/pcl/search/organized.h>

Inheritance diagram for pcl::search::OrganizedNeighbor:
Inheritance graph
[legend]
Collaboration diagram for pcl::search::OrganizedNeighbor:
Collaboration graph
[legend]

List of all members.

Public Types

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

Public Member Functions

 OrganizedNeighbor ()
 OrganizedNeighbor constructor.
 ~OrganizedNeighbor ()
 Empty deconstructor.
void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input data set.
PointCloudConstPtr getInputCloud ()
 Get a pointer to the input dataset as passed by the user.
double getMaxDistance () const
 Get the maximum allowed distance between the query point and its nearest neighbors.
void setMaxDistance (double max_dist)
 Set the maximum allowed distance between the query point and its nearest neighbors.
void setSearchWindow (int horizontal, int vertical)
 set the search window (horizontal, vertical) in pixels.
void setSearchWindowAsK (int k)
 Estimate the search window (horizontal, vertical) in pixels in order to get up to k-neighbors.
int getHorizontalSearchWindow () const
 Get the horizontal search window in pixels.
int getVerticalSearchWindow () const
 Get the vertical search window in pixels.
int nearestKSearch (const PointT &p_q, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)
 Search for the k-nearest neighbors for a 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 nearestKSearch (const pcl::PointCloud< PointT > &cloud, int index, int k, std::vector< int > &k_indices, std::vector< float > &k_distances)
 Search for the k-nearest neighbors for a given query point.
int radiusSearch (const pcl::PointCloud< PointT > &cloud, int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=INT_MAX)
 Approximate search for neighbors around the given query point within radius.
int radiusSearch (int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=INT_MAX) const
 Approximate search for neighbors around the given query point within radius.
int radiusSearch (const PointT &p_q, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=INT_MAX) const
 Approximate search for neighbors around the given query point within radius.
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 IndicesConstPtr const getIndices ()
 Get a pointer to the vector of indices used.
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.
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.

Detailed Description

OrgfanizedNeighbor is a class for optimized nearest neigbhor search in organized point clouds.

Author:
Radu B. Rusu, Julius Kammerl, Suat Gedikli

Member Typedef Documentation

typedef boost::shared_ptr<const pcl::search::Search<PointT> > pcl::search::Search::ConstPtr [inherited]

Reimplemented in pcl::search::Octree, and pcl::search::KdTree.

Definition at line 60 of file search.h.

typedef boost::shared_ptr<std::vector<int> > pcl::search::Search::IndicesPtr [inherited]

Reimplemented in pcl::search::AutotunedSearch, and pcl::search::Octree.

Definition at line 62 of file search.h.

typedef boost::shared_ptr<pcl::search::Search<PointT> > pcl::search::Search::Ptr [inherited]

Reimplemented in pcl::search::Octree, and pcl::search::KdTree.

Definition at line 59 of file search.h.


Constructor & Destructor Documentation

pcl::search::OrganizedNeighbor::OrganizedNeighbor ( ) [inline]

OrganizedNeighbor constructor.

Definition at line 72 of file organized.h.

pcl::search::OrganizedNeighbor::~OrganizedNeighbor ( ) [inline]

Empty deconstructor.

Definition at line 80 of file organized.h.


Member Function Documentation

int pcl::search::OrganizedNeighbor::getHorizontalSearchWindow ( ) const [inline]

Get the horizontal search window in pixels.

Definition at line 134 of file organized.h.

virtual IndicesConstPtr const pcl::search::Search::getIndices ( ) [inline, virtual, inherited]

Get a pointer to the vector of indices used.

Reimplemented in pcl::search::KdTree, pcl::search::Octree, and pcl::search::AutotunedSearch.

Definition at line 95 of file search.h.

PointCloudConstPtr pcl::search::OrganizedNeighbor::getInputCloud ( ) [inline, virtual]

Get a pointer to the input dataset as passed by the user.

Implements pcl::search::Search< PointT >.

Definition at line 96 of file organized.h.

double pcl::search::OrganizedNeighbor::getMaxDistance ( ) const [inline]

Get the maximum allowed distance between the query point and its nearest neighbors.

Definition at line 103 of file organized.h.

int pcl::search::OrganizedNeighbor::getVerticalSearchWindow ( ) const [inline]

Get the vertical search window in pixels.

Definition at line 141 of file organized.h.

int pcl::search::OrganizedNeighbor::nearestKSearch ( const PointT &  p_q,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
) [inline, virtual]

Search for the k-nearest neighbors for a given query point.

Note:
limiting the maximum search radius (with setMaxDistance) can lead to a significant improvement in search speed
Parameters:
[in]p_qthe given query point (setInputCloud must be given a-priori!)
[in]kthe number of neighbors to search for (used only if horizontal and vertical window not given already!)
[out]k_indicesthe resultant point indices (must be resized to k beforehand!)
[out]k_distances
Note:
this function does not return distances
Returns:
number of neighbors found

Implements pcl::search::Search< PointT >.

Definition at line 155 of file organized.h.

int pcl::search::OrganizedNeighbor::nearestKSearch ( int  index,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_distances 
) [virtual]

Search for the k-nearest neighbors for the given query point (zero-copy).

Note:
limiting the maximum search radius (with setMaxDistance) can lead to a significant improvement in search speed
Parameters:
[in]indexthe index representing the query point in the dataset (setInputCloud must be given a-priori!)
[in]kthe number of neighbors to search for (used only if horizontal and vertical window not given already!)
[out]k_indicesthe resultant point indices (must be resized to k beforehand!)
[out]k_distances
Note:
this function does not return distances
Returns:
number of neighbors found

Implements pcl::search::Search< PointT >.

Definition at line 210 of file organized.hpp.

int pcl::search::OrganizedNeighbor::nearestKSearch ( const pcl::PointCloud< PointT > &  cloud,
int  index,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_distances 
) [virtual]

Search for the k-nearest neighbors for a given query point.

Note:
limiting the maximum search radius (with setMaxDistance) can lead to a significant improvement in search speed
Parameters:
[in]cloudthe point cloud data
[in]indexthe index in cloud representing the query point
[in]kthe number of neighbors to search for (used only if horizontal and vertical window not given already!)
[out]k_indicesthe resultant point indices (must be resized to k beforehand!)
[out]k_distances
Note:
this function does not return distances
Returns:
number of neighbors found

Implements pcl::search::Search< PointT >.

Definition at line 277 of file organized.hpp.

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.

Parameters:
[in]pointthe given query point
[in]kthe number of neighbors to search for
[out]k_indicesthe resultant indices of the neighboring points (must be resized to k a priori!)
[out]k_sqr_distancesthe 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.

int pcl::search::OrganizedNeighbor::radiusSearch ( const pcl::PointCloud< PointT > &  cloud,
int  index,
double  radius,
std::vector< int > &  k_indices,
std::vector< float > &  k_distances,
int  max_nn = INT_MAX 
) [virtual]

Approximate search for neighbors around the given query point within radius.

Parameters:
[in]cloudthe point cloud data.
[in]indexthe index in cloud representing the query point.
[in]radiusthe maximum distance to search for neighbors in.
[out]k_indicesthe resultant point indices
[out]k_distancesthe resultant !squared! point distances
[in]max_nnmaximum number of points to return

Implements pcl::search::Search< PointT >.

Definition at line 47 of file organized.hpp.

int pcl::search::OrganizedNeighbor::radiusSearch ( int  index,
double  radius,
std::vector< int > &  k_indices,
std::vector< float > &  k_distances,
int  max_nn = INT_MAX 
) const [virtual]

Approximate search for neighbors around the given query point within radius.

Parameters:
[in]indexthe index representing the query point in the dataset (setInputCloud must be given a-priori!)
[in]radiusthe maximum distance to search for neighbors in.
[out]k_indicesthe resultant point indices
[out]k_distancesthe resultant !squared! point distances
[in]max_nnmaximum number of points to return

Implements pcl::search::Search< PointT >.

Definition at line 125 of file organized.hpp.

int pcl::search::OrganizedNeighbor::radiusSearch ( const PointT &  p_q,
double  radius,
std::vector< int > &  k_indices,
std::vector< float > &  k_distances,
int  max_nn = INT_MAX 
) const [inline, virtual]

Approximate search for neighbors around the given query point within radius.

Parameters:
[in]pointthe given query point
[in]radiusthe maximum distance to search for neighbors in.
[out]k_indicesthe resultant point indices
[out]k_distancesthe resultant !squared! point distances
[in]max_nnmaximum number of points to return

Implements pcl::search::Search< PointT >.

Definition at line 220 of file organized.h.

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.

Parameters:
[in]pointthe given query point
[in]radiusthe radius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points
[out]k_distancesthe resultant squared distances to the neighboring points
[in]max_nnif given, bounds the maximum returned neighbors to this value
Returns:
number of neighbors found in radius

Definition at line 177 of file search.h.

virtual void pcl::search::Search::setInputCloud ( const PointCloudConstPtr cloud,
const IndicesConstPtr indices 
) [inline, virtual, inherited]

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

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

Definition at line 81 of file search.h.

virtual void pcl::search::Search::setInputCloud ( const PointCloudConstPtr cloud) [pure virtual, inherited]

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

Parameters:
[in]clouda const pointer to the PointCloud data
void pcl::search::OrganizedNeighbor::setInputCloud ( const PointCloudConstPtr &  cloud) [inline]

Provide a pointer to the input data set.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Definition at line 88 of file organized.h.

void pcl::search::OrganizedNeighbor::setMaxDistance ( double  max_dist) [inline]

Set the maximum allowed distance between the query point and its nearest neighbors.

Definition at line 110 of file organized.h.

void pcl::search::OrganizedNeighbor::setSearchWindow ( int  horizontal,
int  vertical 
) [inline]

set the search window (horizontal, vertical) in pixels.

Parameters:
horizontalthe horizontal window in pixel
verticalthe vertical window in pixel

Definition at line 120 of file organized.h.

void pcl::search::OrganizedNeighbor::setSearchWindowAsK ( int  k)

Estimate the search window (horizontal, vertical) in pixels in order to get up to k-neighbors.

Parameters:
kthe number of neighbors requested

Definition at line 339 of file organized.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines