22 #ifndef _LIBS_PCL_UTILS_COMPARISONS_H_
23 #define _LIBS_PCL_UTILS_COMPARISONS_H_
25 #include "compatibility.h"
27 #include <pcl/ModelCoefficients.h>
28 #include <pcl/filters/conditional_removal.h>
29 #include <pcl/point_cloud.h>
30 #include <pcl/segmentation/extract_polygonal_prism_data.h>
43 template <
typename Po
intT>
46 using pcl::ComparisonBase<PointT>::capable_;
50 typedef pcl::shared_ptr<PolygonComparison<PointT>>
Ptr;
52 typedef pcl::shared_ptr<const PolygonComparison<PointT>>
ConstPtr;
61 capable_ = (polygon.size() >= 3);
77 return pcl::isPointIn2DPolygon(point,
polygon_);
79 return !pcl::isPointIn2DPolygon(point,
polygon_);
99 template <
typename Po
intT>
102 using pcl::ComparisonBase<PointT>::capable_;
106 typedef pcl::shared_ptr<PlaneDistanceComparison<PointT>>
Ptr;
108 typedef pcl::shared_ptr<const PlaneDistanceComparison<PointT>>
ConstPtr;
116 pcl::ComparisonOps::CompareOp op = pcl::ComparisonOps::GT,
117 float compare_val = 0.)
120 capable_ = (
coeff_->values.size() == 4);
135 (
coeff_->values[0] * point.x +
coeff_->values[1] * point.y +
coeff_->values[2] * point.z
142 if (
op_ == pcl::ComparisonOps::GT) {
144 }
else if (
op_ == pcl::ComparisonOps::GE) {
146 }
else if (
op_ == pcl::ComparisonOps::LT) {
148 }
else if (
op_ == pcl::ComparisonOps::LE) {
159 pcl::ComparisonOps::CompareOp
op_;