38 #ifndef PCL_FILTERS_IMPL_FILTER_H_
39 #define PCL_FILTERS_IMPL_FILTER_H_
42 #include <pcl/filters/filter.h>
45 template <
typename Po
intT>
void
48 std::vector<int> &index)
51 if (&cloud_in != &cloud_out)
59 index.resize (cloud_in.
points.size ());
66 for (std::size_t j = 0; j < cloud_out.
points.size (); ++j)
67 index[j] = static_cast<int>(j);
72 for (std::size_t i = 0; i < cloud_in.
points.size (); ++i)
74 if (!std::isfinite (cloud_in.
points[i].x) ||
75 !std::isfinite (cloud_in.
points[i].y) ||
76 !std::isfinite (cloud_in.
points[i].z))
79 index[j] = static_cast<int>(i);
82 if (j != cloud_in.
points.size ())
85 cloud_out.
points.resize (j);
90 cloud_out.
width = static_cast<std::uint32_t>(j);
98 template <
typename Po
intT>
void
101 std::vector<int> &index)
104 if (&cloud_in != &cloud_out)
112 index.resize (cloud_in.
points.size ());
115 for (std::size_t i = 0; i < cloud_in.
points.size (); ++i)
117 if (!std::isfinite (cloud_in.
points[i].normal_x) ||
118 !std::isfinite (cloud_in.
points[i].normal_y) ||
119 !std::isfinite (cloud_in.
points[i].normal_z))
122 index[j] = static_cast<int>(i);
125 if (j != cloud_in.
points.size ())
128 cloud_out.
points.resize (j);
133 cloud_out.
width = static_cast<std::uint32_t>(j);
137 #define PCL_INSTANTIATE_removeNaNFromPointCloud(T) template PCL_EXPORTS void pcl::removeNaNFromPointCloud<T>(const pcl::PointCloud<T>&, pcl::PointCloud<T>&, std::vector<int>&);
138 #define PCL_INSTANTIATE_removeNaNNormalsFromPointCloud(T) template PCL_EXPORTS void pcl::removeNaNNormalsFromPointCloud<T>(const pcl::PointCloud<T>&, pcl::PointCloud<T>&, std::vector<int>&);
140 #endif // PCL_FILTERS_IMPL_FILTER_H_