38 #ifndef PCL_FILTERS_IMPL_FILTER_INDICES_H_
39 #define PCL_FILTERS_IMPL_FILTER_INDICES_H_
41 #include <pcl/filters/filter_indices.h>
43 template <
typename Po
intT>
void
45 std::vector<int> &index)
48 index.resize (cloud_in.
size ());
53 for (
int j = 0; j < static_cast<int> (cloud_in.
size ()); ++j)
59 for (
int i = 0; i < static_cast<int> (cloud_in.
size ()); ++i)
61 if (!std::isfinite (cloud_in[i].x) ||
62 !std::isfinite (cloud_in[i].y) ||
63 !std::isfinite (cloud_in[i].z))
68 if (j !=
static_cast<int> (cloud_in.
size ()))
76 template<
typename Po
intT>
void
79 std::vector<int> indices;
82 if (!extract_removed_indices_)
84 PCL_WARN (
"[pcl::FilterIndices<PointT>::applyFilter] extract_removed_indices_ was set to 'true' to keep the point cloud organized.\n");
85 extract_removed_indices_ =
true;
87 applyFilter (indices);
95 const PointXYZ ufv (user_filter_value_, user_filter_value_, user_filter_value_);
96 for (
const auto ri : *removed_indices_)
98 if (!std::isfinite (user_filter_value_))
104 applyFilter (indices);
110 #define PCL_INSTANTIATE_removeNanFromPointCloud(T) template PCL_EXPORTS void pcl::removeNaNFromPointCloud<T>(const pcl::PointCloud<T>&, std::vector<int>&);
111 #define PCL_INSTANTIATE_FilterIndices(T) template class PCL_EXPORTS pcl::FilterIndices<T>;
113 #endif // PCL_FILTERS_IMPL_FILTER_INDICES_H_