39 #ifndef PCL_KEYPOINT_IMPL_H_
40 #define PCL_KEYPOINT_IMPL_H_
46 template <
typename Po
intInT,
typename Po
intOutT>
bool
55 if (input_->isOrganized ())
66 tree_->setInputCloud (surface_);
69 if (search_radius_ != 0.0)
73 PCL_ERROR (
"[pcl::%s::initCompute] Both radius (%f) and K (%d) defined! Set one of them to zero first and then re-run compute ().\n", getClassName ().c_str (), search_radius_, k_);
78 search_parameter_ = search_radius_;
79 if (surface_ == input_)
82 search_method_ = [
this] (
int index,
double radius, std::vector<int> &k_indices, std::vector<float> &k_distances)
84 return tree_->radiusSearch (index, radius, k_indices, k_distances, 0);
90 search_method_surface_ = [
this] (
const PointCloudIn &cloud,
int index,
double radius, std::vector<int> &k_indices, std::vector<float> &k_distances)
92 return tree_->radiusSearch (cloud, index, radius, k_indices, k_distances, 0);
100 search_parameter_ = k_;
101 if (surface_ == input_)
104 search_method_ = [
this] (
int index,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
106 return tree_->nearestKSearch (index, k, k_indices, k_distances);
112 search_method_surface_ = [
this] (
const PointCloudIn &cloud,
int index,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
114 return tree_->nearestKSearch (cloud, index, k, k_indices, k_distances);
120 PCL_ERROR (
"[pcl::%s::initCompute] Neither radius nor K defined! Set one of them to a positive number first and then re-run compute ().\n", getClassName ().c_str ());
126 keypoints_indices_->indices.reserve (input_->size ());
132 template <
typename Po
intInT,
typename Po
intOutT>
inline void
137 PCL_ERROR (
"[pcl::%s::compute] initCompute failed!\n", getClassName ().c_str ());
142 detectKeypoints (output);
147 if (input_ == surface_)
153 #endif //#ifndef PCL_KEYPOINT_IMPL_H_