40 #include <pcl/point_types.h>
41 #include <pcl/Vertices.h>
42 #include <pcl/filters/filter_indices.h>
51 template<
typename Po
intT>
64 using Ptr = shared_ptr<CropHull<PointT> >;
65 using ConstPtr = shared_ptr<const CropHull<PointT> >;
83 hull_polygons_ = polygons;
91 return (hull_polygons_);
100 hull_cloud_ = points;
107 return (hull_cloud_);
129 crop_outside_ = crop_outside;
151 getHullCloudRange ();
159 template<
unsigned PlaneDim1,
unsigned PlaneDim2>
void
169 template<
unsigned PlaneDim1,
unsigned PlaneDim2>
void
170 applyFilter2D (std::vector<int> &indices);
192 applyFilter3D (std::vector<int> &indices);
200 template<
unsigned PlaneDim1,
unsigned PlaneDim2>
inline static bool
201 isPointIn2DPolyWithVertIndices (
const PointT& point,
214 rayTriangleIntersect (
const PointT& point,
215 const Eigen::Vector3f& ray,
221 std::vector<pcl::Vertices> hull_polygons_;
224 PointCloudPtr hull_cloud_;
237 #ifdef PCL_NO_PRECOMPILE
238 #include <pcl/filters/impl/crop_hull.hpp>
Filter points that lie inside or outside a 3D closed surface or 2D closed polygon, as generated by the ConvexHull or ConcaveHull classes.
void setHullCloud(PointCloudPtr points)
Set the point cloud that the hull indices refer to.
void applyFilter(PointCloud &output) override
Filter the input points using the 2D or 3D polygon hull.
std::vector< Vertices > getHullIndices() const
Get the vertices of the hull used to filter points.
Describes a set of vertices in a polygon mesh, by basically storing an array of indices.
shared_ptr< const CropHull< PointT > > ConstPtr
FilterIndices represents the base class for filters that are about binary point removal.
shared_ptr< PointCloud< PointT > > Ptr
Filter represents the base filter class.
void setCropOutside(bool crop_outside)
Remove points outside the hull (default), or those inside the hull.
void setDim(int dim)
Set the dimensionality of the hull to be used.
typename PointCloud::Ptr PointCloudPtr
void setHullIndices(const std::vector< Vertices > &polygons)
Set the vertices of the hull used to filter points.
shared_ptr< CropHull< PointT > > Ptr
PointCloud represents the base class in PCL for storing collections of 3D points. ...
shared_ptr< const PointCloud< PointT > > ConstPtr
std::string filter_name_
The filter name.
A point structure representing Euclidean xyz coordinates, and the RGB color.
CropHull()
Empty Constructor.
PointCloudPtr getHullCloud() const
Get the point cloud that the hull indices refer to.
typename PointCloud::ConstPtr PointCloudConstPtr