40 #ifndef PCL_FEATURES_IMPL_SHOT_LRF_OMP_H_
41 #define PCL_FEATURES_IMPL_SHOT_LRF_OMP_H_
43 #include <pcl/features/shot_lrf_omp.h>
44 #include <pcl/features/shot_lrf.h>
47 template<
typename Po
intInT,
typename Po
intOutT>
void
52 threads_ = omp_get_num_procs();
57 threads_ = nr_threads;
61 template<
typename Po
intInT,
typename Po
intOutT>
void
65 if (this->getKSearch () != 0)
68 "[pcl::%s::computeFeature] Error! Search method set to k-neighborhood. Call setKSearch(0) and setRadiusSearch( radius ) to use this class.\n",
69 getClassName().c_str ());
72 tree_->setSortedResults (
true);
74 #pragma omp parallel for \
78 for (std::ptrdiff_t i = 0; i < static_cast<std::ptrdiff_t> (indices_->size ()); ++i)
82 PointOutT& output_rf = output[i];
87 if (getLocalRF ((*indices_)[i], rf) == std::numeric_limits<float>::max ())
89 output.is_dense =
false;
92 for (
int d = 0; d < 3; ++d)
94 output_rf.x_axis[d] = rf.row (0)[d];
95 output_rf.y_axis[d] = rf.row (1)[d];
96 output_rf.z_axis[d] = rf.row (2)[d];
102 #define PCL_INSTANTIATE_SHOTLocalReferenceFrameEstimationOMP(T,OutT) template class PCL_EXPORTS pcl::SHOTLocalReferenceFrameEstimationOMP<T,OutT>;
void computeFeature(PointCloudOut &output) override
Feature estimation method.
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut