40 #ifndef PCL_FEATURES_IMPL_SHOT_LRF_OMP_H_
41 #define PCL_FEATURES_IMPL_SHOT_LRF_OMP_H_
44 #include <pcl/features/shot_lrf_omp.h>
45 #include <pcl/features/shot_lrf.h>
48 template<
typename Po
intInT,
typename Po
intOutT>
void
53 threads_ = omp_get_num_procs();
58 threads_ = nr_threads;
62 template<
typename Po
intInT,
typename Po
intOutT>
void
66 if (this->getKSearch () != 0)
69 "[pcl::%s::computeFeature] Error! Search method set to k-neighborhood. Call setKSearch(0) and setRadiusSearch( radius ) to use this class.\n",
70 getClassName().c_str ());
73 tree_->setSortedResults (
true);
76 #pragma omp parallel for num_threads(threads_)
78 for (std::ptrdiff_t i = 0; i < static_cast<std::ptrdiff_t> (indices_->size ()); ++i)
82 PointOutT& output_rf = output[i];
87 std::vector<int> n_indices;
88 std::vector<float> n_sqr_distances;
89 this->searchForNeighbors ((*indices_)[i], search_parameter_, n_indices, n_sqr_distances);
90 if (getLocalRF ((*indices_)[i], rf) == std::numeric_limits<float>::max ())
95 for (
int d = 0; d < 3; ++d)
97 output_rf.x_axis[d] = rf.row (0)[d];
98 output_rf.y_axis[d] = rf.row (1)[d];
99 output_rf.z_axis[d] = rf.row (2)[d];
105 #define PCL_INSTANTIATE_SHOTLocalReferenceFrameEstimationOMP(T,OutT) template class PCL_EXPORTS pcl::SHOTLocalReferenceFrameEstimationOMP<T,OutT>;
107 #endif // PCL_FEATURES_IMPL_SHOT_LRF_H_