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>
shared_ptr< PointCloud< PointT > > Ptr
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.
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
void applyFilter(Indices &indices) override
Filter the input points using the 2D or 3D polygon hull.
FilterIndices represents the base class for filters that are about binary point removal.
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
IndicesAllocator<> Indices
Type used for indices in PCL.
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