38 #ifndef PCL_SEARCH_BRUTE_FORCE_H_
39 #define PCL_SEARCH_BRUTE_FORCE_H_
41 #include <pcl/search/search.h>
51 template<
typename Po
intT>
57 typedef boost::shared_ptr<std::vector<int> > IndicesPtr;
58 typedef boost::shared_ptr<const std::vector<int> > IndicesConstPtr;
66 Entry (
int idx,
float dist) : index (idx), distance (dist) {}
68 Entry () : index (0), distance (0) {}
73 operator < (
const Entry& other)
const
75 return (distance < other.distance);
79 operator > (
const Entry& other)
const
81 return (distance > other.distance);
86 float getDistSqr (
const PointT& point1,
const PointT& point2)
const;
108 nearestKSearch (
const PointT &point,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
const;
122 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances,
123 unsigned int max_nn = 0)
const;
127 denseKSearch (
const PointT &point,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
const;
130 sparseKSearch (
const PointT &point,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
const;
133 denseRadiusSearch (
const PointT& point,
double radius,
134 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances,
135 unsigned int max_nn = 0)
const;
138 sparseRadiusSearch (
const PointT& point,
double radius,
139 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances,
140 unsigned int max_nn = 0)
const;
145 #ifdef PCL_NO_PRECOMPILE
146 #include <pcl/search/impl/brute_force.hpp>
149 #endif // PCL_SEARCH_BRUTE_FORCE_H_
virtual ~BruteForce()
Destructor for KdTree.
PointCloud::ConstPtr PointCloudConstPtr
This file defines compatibility wrappers for low level I/O functions.
BruteForce(bool sorted_results=false)
int nearestKSearch(const PointT &point, int k, std::vector< int > &k_indices, std::vector< float > &k_distances) const
Search for the k-nearest neighbors for the given query point.
Implementation of a simple brute force search algorithm.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
int radiusSearch(const PointT &point, double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const
Search for all the nearest neighbors of the query point in a given radius.
A point structure representing Euclidean xyz coordinates, and the RGB color.