38 #ifndef PCL_FILTERS_CROP_HULL_H_
39 #define PCL_FILTERS_CROP_HULL_H_
41 #include <pcl/point_types.h>
42 #include <pcl/Vertices.h>
43 #include <pcl/filters/filter_indices.h>
52 template<
typename Po
intT>
65 typedef boost::shared_ptr< CropHull<PointT> >
Ptr;
66 typedef boost::shared_ptr< const CropHull<PointT> >
ConstPtr;
85 hull_polygons_ = polygons;
93 return (hull_polygons_);
102 hull_cloud_ = points;
109 return (hull_cloud_);
131 crop_outside_ = crop_outside;
153 getHullCloudRange ();
161 template<
unsigned PlaneDim1,
unsigned PlaneDim2>
void
162 applyFilter2D (PointCloud &output);
171 template<
unsigned PlaneDim1,
unsigned PlaneDim2>
void
172 applyFilter2D (std::vector<int> &indices);
183 applyFilter3D (PointCloud &output);
194 applyFilter3D (std::vector<int> &indices);
202 template<
unsigned PlaneDim1,
unsigned PlaneDim2>
inline static bool
203 isPointIn2DPolyWithVertIndices (
const PointT& point,
205 const PointCloud& cloud);
216 rayTriangleIntersect (
const PointT& point,
217 const Eigen::Vector3f& ray,
219 const PointCloud& cloud);
223 std::vector<pcl::Vertices> hull_polygons_;
226 PointCloudPtr hull_cloud_;
239 #ifdef PCL_NO_PRECOMPILE
240 #include <pcl/filters/impl/crop_hull.hpp>
243 #endif // ifndef PCL_FILTERS_CROP_HULL_H_
void applyFilter(PointCloud &output)
Filter the input points using the 2D or 3D polygon hull.
boost::shared_ptr< PointCloud< PointT > > Ptr
PointCloud::ConstPtr PointCloudConstPtr
This file defines compatibility wrappers for low level I/O functions.
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.
FilterIndices represents the base class for filters that are about binary point removal.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
PointCloud::Ptr PointCloudPtr
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.
void setHullIndices(const std::vector< Vertices > &polygons)
Set the vertices of the hull used to filter points.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
boost::shared_ptr< const CropHull< PointT > > ConstPtr
boost::shared_ptr< CropHull< PointT > > Ptr
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.