28 #include <pcl/point_cloud.h>
32 template <
typename Predicate>
36 const auto it = std::remove_if(
c.begin(),
c.end(), pred);
43 template <
typename Po
intT>
48 virtual void applyFilter(pcl::PointCloud<PointT>& cloud)
const = 0;
54 template <
typename Po
intT,
typename OperatorT>
58 explicit RangeFilter(
const float rangeThreshold) : rangeThreshold(rangeThreshold)
65 constexpr
auto comp = OperatorT();
67 const auto pred = [&](
const PointT& point)
68 {
return comp(rangeThreshold, Eigen::Vector2f(point.x, point.y).norm()); };
74 const float rangeThreshold;
78 template <
typename Po
intT>
80 template <
typename Po
intT>
86 template <
typename Po
intT,
typename OperatorT>
91 rangeThreshold(rangeThreshold), point(point)
98 constexpr
auto comp = OperatorT();
100 const auto pred = [&](
const PointT& pclPoint) ->
bool
102 const Eigen::Vector3f pt(pclPoint.x, pclPoint.y, pclPoint.z);
103 return comp(rangeThreshold, (pt - point).
norm());
110 const float rangeThreshold;
111 const Eigen::Vector3f point;
115 template <
typename Po
intT>
117 template <
typename Po
intT>