39 #ifndef PCL_KEYPOINT_IMPL_H_
40 #define PCL_KEYPOINT_IMPL_H_
42 #include <pcl/console/print.h>
44 #include <pcl/search/auto.h>
49 template <
typename Po
intInT,
typename Po
intOutT>
bool
61 tree_.reset (pcl::search::autoSelectMethod<PointInT> (surface_,
false));
64 tree_->setInputCloud (surface_);
67 if (search_radius_ != 0.0)
71 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_);
76 search_parameter_ = search_radius_;
77 if (surface_ == input_)
80 search_method_ = [
this] (
pcl::index_t index,
double radius,
pcl::Indices &k_indices, std::vector<float> &k_distances)
82 return tree_->radiusSearch (index, radius, k_indices, k_distances, 0);
90 return tree_->radiusSearch (cloud, index, radius, k_indices, k_distances, 0);
98 search_parameter_ = k_;
99 if (surface_ == input_)
104 return tree_->nearestKSearch (index, k, k_indices, k_distances);
112 return tree_->nearestKSearch (cloud, index, k, k_indices, k_distances);
118 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 ());
124 keypoints_indices_->indices.reserve (input_->size ());
130 template <
typename Po
intInT,
typename Po
intOutT>
inline void
135 PCL_ERROR (
"[pcl::%s::compute] initCompute failed!\n", getClassName ().c_str ());
140 detectKeypoints (output);
145 if (input_ == surface_)
Keypoint represents the base class for key points.
virtual bool initCompute()
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
IndicesAllocator<> Indices
Type used for indices in PCL.