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);
75 int data_size = static_cast<int> (indices_->size ());
77 #pragma omp parallel for num_threads(threads_) 79 for (
int i = 0; i < data_size; ++i)
83 PointOutT& output_rf = output[i];
88 std::vector<int> n_indices;
89 std::vector<float> n_sqr_distances;
90 this->searchForNeighbors ((*indices_)[i], search_parameter_, n_indices, n_sqr_distances);
91 if (getLocalRF ((*indices_)[i], rf) == std::numeric_limits<float>::max ())
96 for (
int d = 0; d < 3; ++d)
98 output_rf.x_axis[d] = rf.row (0)[d];
99 output_rf.y_axis[d] = rf.row (1)[d];
100 output_rf.z_axis[d] = rf.row (2)[d];
106 #define PCL_INSTANTIATE_SHOTLocalReferenceFrameEstimationOMP(T,OutT) template class PCL_EXPORTS pcl::SHOTLocalReferenceFrameEstimationOMP<T,OutT>; 108 #endif // PCL_FEATURES_IMPL_SHOT_LRF_H_ virtual void computeFeature(PointCloudOut &output)
Feature estimation method.
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
PointCloud represents the base class in PCL for storing collections of 3D points.
bool is_dense
True if no points are invalid (e.g., have NaN or Inf values in any of their floating point fields).