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
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
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>&, Indices&);
111 #define PCL_INSTANTIATE_FilterIndices(T) template class PCL_EXPORTS pcl::FilterIndices<T>;
virtual void applyFilter(Indices &indices)=0
Abstract filter method for point cloud indices.
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).
void copyPoint(const PointInT &point_in, PointOutT &point_out)
Copy the fields of a source point into a target point.
void copyPointCloud(const pcl::PointCloud< PointInT > &cloud_in, pcl::PointCloud< PointOutT > &cloud_out)
Copy all the fields from a given point cloud into a new point cloud.
void removeNaNFromPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, Indices &index)
Removes points with x, y, or z equal to NaN.
IndicesAllocator<> Indices
Type used for indices in PCL.
A point structure representing Euclidean xyz coordinates.