40 #include <pcl/Vertices.h>
41 #include <pcl/filters/filter_indices.h>
50 template<
typename Po
intT>
64 using Ptr = shared_ptr<CropHull<PointT> >;
65 using ConstPtr = shared_ptr<const CropHull<PointT> >;
81 hull_polygons_ = polygons;
89 return (hull_polygons_);
105 return (hull_cloud_);
127 crop_outside_ = crop_outside;
144 getHullCloudRange ();
153 template<
unsigned PlaneDim1,
unsigned PlaneDim2>
void
154 applyFilter2D (
Indices &indices);
165 applyFilter3D (
Indices &indices);
173 template<
unsigned PlaneDim1,
unsigned PlaneDim2>
inline static bool
174 isPointIn2DPolyWithVertIndices (
const PointT& point,
187 rayTriangleIntersect (
const PointT& point,
188 const Eigen::Vector3f& ray,
194 std::vector<pcl::Vertices> hull_polygons_;
197 PointCloudPtr hull_cloud_;
205 bool crop_outside_{
true};
210 #ifdef PCL_NO_PRECOMPILE
211 #include <pcl/filters/impl/crop_hull.hpp>
Filter points that lie inside or outside a 3D closed surface or 2D closed polygon,...
void setHullIndices(const std::vector< Vertices > &polygons)
Set the vertices of the hull used to filter points.
void setCropOutside(bool crop_outside)
Remove points outside the hull (default), or those inside the hull.
CropHull()
Empty Constructor.
void applyFilter(Indices &indices) 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.
void setDim(int dim)
Set the dimensionality of the hull to be used.
shared_ptr< CropHull< PointT > > Ptr
shared_ptr< const CropHull< PointT > > ConstPtr
void setHullCloud(PointCloudPtr points)
Set the point cloud that the hull indices refer to.
PointCloudPtr getHullCloud() const
Get the point cloud that the hull indices refer to.
Filter represents the base filter class.
std::string filter_name_
The filter name.
FilterIndices represents the base class for filters that are about binary point removal.
typename PointCloud::Ptr PointCloudPtr
typename PointCloud::ConstPtr PointCloudConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
IndicesAllocator<> Indices
Type used for indices in PCL.
A point structure representing Euclidean xyz coordinates, and the RGB color.
Describes a set of vertices in a polygon mesh, by basically storing an array of indices.