38 #ifndef PCL_KEYPOINT_IMPL_H_
39 #define PCL_KEYPOINT_IMPL_H_
42 template <
typename Po
intInT,
typename Po
intOutT>
bool
51 if (input_->isOrganized ())
62 tree_->setInputCloud (surface_);
65 if (search_radius_ != 0.0)
69 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_);
74 search_parameter_ = search_radius_;
75 if (surface_ == input_)
78 search_method_ = [
this] (
int index,
double radius, std::vector<int> &k_indices, std::vector<float> &k_distances)
80 return tree_->radiusSearch (index, radius, k_indices, k_distances, 0);
86 search_method_surface_ = [
this] (
const PointCloudIn &cloud,
int index,
double radius, std::vector<int> &k_indices, std::vector<float> &k_distances)
88 return tree_->radiusSearch (cloud, index, radius, k_indices, k_distances, 0);
96 search_parameter_ = k_;
97 if (surface_ == input_)
100 search_method_ = [
this] (
int index,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
102 return tree_->nearestKSearch (index, k, k_indices, k_distances);
108 search_method_surface_ = [
this] (
const PointCloudIn &cloud,
int index,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
110 return tree_->nearestKSearch (cloud, index, k, k_indices, k_distances);
116 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 ());
122 keypoints_indices_->indices.reserve (input_->size ());
128 template <
typename Po
intInT,
typename Po
intOutT>
inline void
133 PCL_ERROR (
"[pcl::%s::compute] initCompute failed!\n", getClassName ().c_str ());
138 detectKeypoints (output);
143 if (input_ == surface_)
147 #endif //#ifndef PCL_KEYPOINT_IMPL_H_