38 #ifndef PCL_FILTERS_IMPL_FILTER_INDICES_H_
39 #define PCL_FILTERS_IMPL_FILTER_INDICES_H_
41 #include <pcl/filters/filter_indices.h>
44 template <
typename Po
intT>
void
49 index.resize (cloud_in.
size ());
54 for (
int j = 0; j < static_cast<int> (cloud_in.
size ()); ++j)
60 for (
int i = 0; i < static_cast<int> (cloud_in.
size ()); ++i)
62 if (!std::isfinite (cloud_in[i].x) ||
63 !std::isfinite (cloud_in[i].y) ||
64 !std::isfinite (cloud_in[i].z))
69 if (j !=
static_cast<int> (cloud_in.
size ()))
77 template<
typename Po
intT>
void
83 if (!extract_removed_indices_)
85 PCL_WARN (
"[pcl::FilterIndices<PointT>::applyFilter] extract_removed_indices_ was set to 'true' to keep the point cloud organized.\n");
86 extract_removed_indices_ =
true;
88 applyFilter (indices);
96 const PointXYZ ufv (user_filter_value_, user_filter_value_, user_filter_value_);
97 for (
const auto ri : *removed_indices_)
99 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).
Defines all the PCL implemented PointT point type structures.
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.