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 int (
KdTree::*radiusSearch)(
int index,
double radius, std::vector<int> &k_indices,
79 std::vector<float> &k_distances,
unsigned int max_nn)
const = &KdTree::radiusSearch;
80 search_method_ = boost::bind (radiusSearch, boost::ref (tree_), _1, _2, _3, _4, 0);
85 int (
KdTree::*radiusSearchSurface)(
const PointCloudIn &cloud,
int index,
double radius, std::vector<int> &k_indices,
86 std::vector<float> &k_distances,
unsigned int max_nn)
const = &KdTree::radiusSearch;
87 search_method_surface_ = boost::bind (radiusSearchSurface, boost::ref (tree_), _1, _2, _3, _4, _5, 0);
95 search_parameter_ = k_;
96 if (surface_ == input_)
99 int (
KdTree::*nearestKSearch)(
int index,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
const = &KdTree::nearestKSearch;
100 search_method_ = boost::bind (nearestKSearch, boost::ref (tree_), _1, _2, _3, _4);
105 int (
KdTree::*nearestKSearchSurface)(
const PointCloudIn &cloud,
int index,
int k, std::vector<int> &k_indices, std::vector<float> &k_distances)
const = &KdTree::nearestKSearch;
106 search_method_surface_ = boost::bind (nearestKSearchSurface, boost::ref (tree_), _1, _2, _3, _4, _5);
111 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 ());
120 template <
typename Po
intInT,
typename Po
intOutT>
inline void
125 PCL_ERROR (
"[pcl::%s::compute] initCompute failed!\n", getClassName ().c_str ());
130 detectKeypoints (output);
135 if (input_ == surface_)
139 #endif //#ifndef PCL_KEYPOINT_IMPL_H_