OrganizedDataIndex is a type of spatial locator used to query organized datasets, such as point clouds acquired using dense stereo devices. The class best supports square data blocks for now in the form of (k*k+1)^2. More...
#include <organized_data.h>
Public Types | |
typedef boost::shared_ptr < const OrganizedDataIndex < PointT > > | ConstPtr |
typedef boost::shared_ptr < OrganizedDataIndex< PointT > > | Ptr |
Public Member Functions | |
int | getHorizontalSearchWindow () const |
Get the horizontal search window in pixels. | |
float | getMaxDistance () const |
Get the maximum allowed distance between the query point and its k-nearest neighbors. | |
int | getVerticalSearchWindow () const |
Get the vertical search window in pixels. | |
Ptr | makeShared () const |
int | nearestKSearch (int index, int k, std::vector< int > &k_indices, std::vector< float > &k_distances) |
Search for 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 k-nearest neighbors for the given query point. | |
int | nearestKSearch (const PointT &p_q, int k, std::vector< int > &k_indices, std::vector< float > &k_distances) |
Search for k-nearest neighbors for the given query point. | |
OrganizedDataIndex () | |
Empty constructor for OrganizedDataIndex. Sets some internal values to their defaults. | |
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 point from the given index within radius. | |
int | radiusSearch (const PointCloud &cloud, 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 |
Search for all the nearest neighbors of the query point in a given radius. | |
void | setMaxDistance (float max_dist) |
Set the maximum allowed distance between the query point and its k-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. | |
Private Types | |
typedef KdTree< PointT > | BaseClass |
typedef KdTree< PointT > ::PointCloud | PointCloud |
typedef KdTree< PointT > ::PointCloudConstPtr | PointCloudConstPtr |
Private Member Functions | |
virtual std::string | getName () const |
Class getName method. | |
Private Attributes | |
int | horizontal_window_ |
The horizontal search window. | |
float | max_distance_ |
Maximum allowed distance between the query point and its k-neighbors. | |
int | vertical_window_ |
The horizontal search window. |
OrganizedDataIndex is a type of spatial locator used to query organized datasets, such as point clouds acquired using dense stereo devices. The class best supports square data blocks for now in the form of (k*k+1)^2.
Definition at line 53 of file organized_data.h.
typedef KdTree<PointT> pcl::OrganizedDataIndex< PointT >::BaseClass [private] |
Definition at line 58 of file organized_data.h.
typedef boost::shared_ptr<const OrganizedDataIndex<PointT> > pcl::OrganizedDataIndex< PointT >::ConstPtr |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 65 of file organized_data.h.
typedef KdTree<PointT>::PointCloud pcl::OrganizedDataIndex< PointT >::PointCloud [private] |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 59 of file organized_data.h.
typedef KdTree<PointT>::PointCloudConstPtr pcl::OrganizedDataIndex< PointT >::PointCloudConstPtr [private] |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 60 of file organized_data.h.
typedef boost::shared_ptr<OrganizedDataIndex<PointT> > pcl::OrganizedDataIndex< PointT >::Ptr |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 64 of file organized_data.h.
pcl::OrganizedDataIndex< PointT >::OrganizedDataIndex | ( | ) | [inline] |
Empty constructor for OrganizedDataIndex. Sets some internal values to their defaults.
Definition at line 68 of file organized_data.h.
int pcl::OrganizedDataIndex< PointT >::getHorizontalSearchWindow | ( | ) | const [inline] |
Get the horizontal search window in pixels.
Definition at line 157 of file organized_data.h.
float pcl::OrganizedDataIndex< PointT >::getMaxDistance | ( | ) | const [inline] |
Get the maximum allowed distance between the query point and its k-nearest neighbors.
Definition at line 167 of file organized_data.h.
virtual std::string pcl::OrganizedDataIndex< PointT >::getName | ( | ) | const [inline, private, virtual] |
Class getName method.
Implements pcl::KdTree< PointT >.
Definition at line 172 of file organized_data.h.
int pcl::OrganizedDataIndex< PointT >::getVerticalSearchWindow | ( | ) | const [inline] |
Get the vertical search window in pixels.
Definition at line 160 of file organized_data.h.
Ptr pcl::OrganizedDataIndex< PointT >::makeShared | ( | ) | const [inline] |
Definition at line 70 of file organized_data.h.
int pcl::OrganizedDataIndex< PointT >::nearestKSearch | ( | int | index, | |
int | k, | |||
std::vector< int > & | k_indices, | |||
std::vector< float > & | k_distances | |||
) | [inline, virtual] |
Search for k-nearest neighbors for the given query point.
index | the index representing the query point | |
k | the number of neighbors to search for (not used) | |
k_indices | the resultant point indices (must be resized to k beforehand!) | |
k_distances |
Implements pcl::KdTree< PointT >.
Definition at line 129 of file organized_data.h.
int pcl::OrganizedDataIndex< PointT >::nearestKSearch | ( | const PointCloud & | cloud, | |
int | index, | |||
int | k, | |||
std::vector< int > & | k_indices, | |||
std::vector< float > & | k_distances | |||
) | [inline, virtual] |
Search for k-nearest neighbors for the given query point.
cloud | the point cloud data | |
index | the index in cloud representing the query point | |
k | the number of neighbors to search for (not used) | |
k_indices | the resultant point indices (must be resized to k beforehand!) | |
k_distances |
Implements pcl::KdTree< PointT >.
Definition at line 115 of file organized_data.hpp.
int pcl::OrganizedDataIndex< PointT >::nearestKSearch | ( | const PointT & | p_q, | |
int | k, | |||
std::vector< int > & | k_indices, | |||
std::vector< float > & | k_sqr_distances | |||
) | [inline, virtual] |
Search for k-nearest neighbors for the given query point.
point | the given query point | |
k | the number of neighbors to search for | |
k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) | |
k_sqr_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Implements pcl::KdTree< PointT >.
Definition at line 73 of file organized_data.h.
int pcl::OrganizedDataIndex< PointT >::radiusSearch | ( | int | index, | |
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 point from the given index within radius.
index | the index in cloud representing the query point. | |
radius | the maximum distance to search for neighbors in. | |
k_indices | the resultant point indices | |
k_distances | the resultant !squared! point distances | |
max_nn | maximum number of points to return |
Implements pcl::KdTree< PointT >.
Definition at line 102 of file organized_data.h.
int pcl::OrganizedDataIndex< PointT >::radiusSearch | ( | const PointCloud & | cloud, | |
int | index, | |||
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.
cloud | the point cloud data. | |
index | the index in cloud representing the query point. | |
radius | the maximum distance to search for neighbors in. | |
k_indices | the resultant point indices | |
k_distances | the resultant !squared! point distances | |
max_nn | maximum number of points to return |
Implements pcl::KdTree< PointT >.
Definition at line 46 of file organized_data.hpp.
int pcl::OrganizedDataIndex< PointT >::radiusSearch | ( | const PointT & | p_q, | |
double | radius, | |||
std::vector< int > & | k_indices, | |||
std::vector< float > & | k_sqr_distances, | |||
int | max_nn = INT_MAX | |||
) | const [inline, virtual] |
Search for all the nearest neighbors of the query point in a given radius.
point | the given query point | |
radius | the radius of the sphere bounding all of p_q's neighbors | |
k_indices | the resultant indices of the neighboring points | |
k_sqr_distances | the resultant squared distances to the neighboring points | |
max_nn | if given, bounds the maximum returned neighbors to this value |
Implements pcl::KdTree< PointT >.
Definition at line 77 of file organized_data.h.
void pcl::OrganizedDataIndex< PointT >::setMaxDistance | ( | float | max_dist | ) | [inline] |
Set the maximum allowed distance between the query point and its k-nearest neighbors.
Definition at line 163 of file organized_data.h.
void pcl::OrganizedDataIndex< PointT >::setSearchWindow | ( | int | horizontal, | |
int | vertical | |||
) | [inline] |
Set the search window (horizontal, vertical) in pixels.
horizontal | the horizontal window | |
vertical | the vertical window |
Definition at line 145 of file organized_data.h.
void pcl::OrganizedDataIndex< PointT >::setSearchWindowAsK | ( | int | k | ) | [inline] |
Estimate the search window (horizontal, vertical) in pixels in order to get up to k-neighbors.
k | the number of neighbors requested |
Definition at line 174 of file organized_data.hpp.
int pcl::OrganizedDataIndex< PointT >::horizontal_window_ [private] |
The horizontal search window.
Definition at line 178 of file organized_data.h.
float pcl::OrganizedDataIndex< PointT >::max_distance_ [private] |
Maximum allowed distance between the query point and its k-neighbors.
Definition at line 175 of file organized_data.h.
int pcl::OrganizedDataIndex< PointT >::vertical_window_ [private] |
The horizontal search window.
Definition at line 181 of file organized_data.h.