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 ());