Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
pcl::CropHull< PointT > Class Template Reference

Filter points that lie inside or outside a 3D closed surface or 2D closed polygon, as generated by the ConvexHull or ConcaveHull classes. More...

#include <crop_hull.h>

Inheritance diagram for pcl::CropHull< PointT >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CropHull ()
 Empty Constructor.
PointCloudPtr getHullCloud () const
 Get the point cloud that the hull indices refer to.
std::vector< Vertices > getHullIndices () const
 Get 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.
void setDim (int dim)
 Set the dimensionality of the hull to be used. This should be set to correspond to the dimensionality of the convex/concave hull produced by the pcl::ConvexHull and pcl::ConcaveHull classes.
void setHullCloud (PointCloudPtr points)
 Set the point cloud that the hull indices refer to.
void setHullIndices (const std::vector< Vertices > &polygons)
 Set the vertices of the hull used to filter points.

Protected Member Functions

void applyFilter (PointCloud &output)
 Filter the input points using the 2D or 3D polygon hull.
void applyFilter (std::vector< int > &indices)
 Filter the input points using the 2D or 3D polygon hull.

Private Types

typedef Filter< PointT >
::PointCloud 
PointCloud
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef PointCloud::Ptr PointCloudPtr

Private Member Functions

template<unsigned PlaneDim1, unsigned PlaneDim2>
void applyFilter2D (PointCloud &output)
 Apply the two-dimensional hull filter. All points are assumed to lie in the same plane as the 2D hull, an axis-aligned 2D coordinate system using the two dimensions specified (PlaneDim1, PlaneDim2) is used for calculations.
template<unsigned PlaneDim1, unsigned PlaneDim2>
void applyFilter2D (std::vector< int > &indices)
 Apply the two-dimensional hull filter. All points are assumed to lie in the same plane as the 2D hull, an axis-aligned 2D coordinate system using the two dimensions specified (PlaneDim1, PlaneDim2) is used for calculations.
void applyFilter3D (PointCloud &output)
 Apply the three-dimensional hull filter. Polygon-ray crossings are used for three rays cast from each point being tested, and a majority vote of the resulting polygon-crossings is used to decide whether the point lies inside or outside the hull.
void applyFilter3D (std::vector< int > &indices)
 Apply the three-dimensional hull filter. Polygon-ray crossings are used for three rays cast from each point being tested, and a majority vote of the resulting polygon-crossings is used to decide whether the point lies inside or outside the hull.
Eigen::Vector3f getHullCloudRange ()
 Return the size of the hull point cloud in line with coordinate axes. This is used to choose the 2D projection to use when cropping to a 2d polygon.

Static Private Member Functions

template<unsigned PlaneDim1, unsigned PlaneDim2>
static bool isPointIn2DPolyWithVertIndices (const PointT &point, const Vertices &verts, const PointCloud &cloud)
 Test an individual point against a 2D polygon. PlaneDim1 and PlaneDim2 specify the x/y/z coordinate axes to use.
static bool rayTriangleIntersect (const PointT &point, const Eigen::Vector3f &ray, const Vertices &verts, const PointCloud &cloud)
 Does a ray cast from a point intersect with an arbitrary triangle in 3D? See: http://softsurfer.com/Archive/algorithm_0105/algorithm_0105.htm#intersect_RayTriangle()

Private Attributes

bool crop_outside_
 If true, the filter will remove points outside the hull. If false, those inside will be removed.
int dim_
 The dimensionality of the hull to be used.
PointCloudPtr hull_cloud_
 The point cloud that the hull indices refer to.
std::vector< pcl::Vertices > hull_polygons_
 The vertices of the hull used to filter points.

Detailed Description

template<typename PointT>
class pcl::CropHull< PointT >

Filter points that lie inside or outside a 3D closed surface or 2D closed polygon, as generated by the ConvexHull or ConcaveHull classes.

Author:
James Crosby

Definition at line 53 of file crop_hull.h.


Member Typedef Documentation

template<typename PointT>
typedef Filter<PointT>::PointCloud pcl::CropHull< PointT >::PointCloud [private]

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 59 of file crop_hull.h.

template<typename PointT>
typedef PointCloud::ConstPtr pcl::CropHull< PointT >::PointCloudConstPtr [private]

Reimplemented from pcl::Filter< PointT >.

Definition at line 61 of file crop_hull.h.

template<typename PointT>
typedef PointCloud::Ptr pcl::CropHull< PointT >::PointCloudPtr [private]

Reimplemented from pcl::Filter< PointT >.

Definition at line 60 of file crop_hull.h.


Constructor & Destructor Documentation

template<typename PointT>
pcl::CropHull< PointT >::CropHull ( ) [inline]

Empty Constructor.

Definition at line 65 of file crop_hull.h.


Member Function Documentation

template<typename PointT >
void pcl::CropHull< PointT >::applyFilter ( PointCloud output) [protected, virtual]

Filter the input points using the 2D or 3D polygon hull.

Parameters:
[out]outputThe set of points that passed the filter

Implements pcl::Filter< PointT >.

Definition at line 45 of file crop_hull.hpp.

template<typename PointT >
void pcl::CropHull< PointT >::applyFilter ( std::vector< int > &  indices) [protected, virtual]

Filter the input points using the 2D or 3D polygon hull.

Parameters:
[out]indicesthe indices of the set of points that passed the filter.

Implements pcl::FilterIndices< PointT >.

Definition at line 70 of file crop_hull.hpp.

template<typename PointT >
template<unsigned PlaneDim1, unsigned PlaneDim2>
void pcl::CropHull< PointT >::applyFilter2D ( PointCloud output) [private]

Apply the two-dimensional hull filter. All points are assumed to lie in the same plane as the 2D hull, an axis-aligned 2D coordinate system using the two dimensions specified (PlaneDim1, PlaneDim2) is used for calculations.

Parameters:
[out]outputThe set of points that pass the 2D polygon filter.

Definition at line 122 of file crop_hull.hpp.

template<typename PointT >
template<unsigned PlaneDim1, unsigned PlaneDim2>
void pcl::CropHull< PointT >::applyFilter2D ( std::vector< int > &  indices) [private]

Apply the two-dimensional hull filter. All points are assumed to lie in the same plane as the 2D hull, an axis-aligned 2D coordinate system using the two dimensions specified (PlaneDim1, PlaneDim2) is used for calculations.

Parameters:
[out]indicesThe indices of the set of points that pass the 2D polygon filter.

Definition at line 151 of file crop_hull.hpp.

template<typename PointT >
void pcl::CropHull< PointT >::applyFilter3D ( PointCloud output) [private]

Apply the three-dimensional hull filter. Polygon-ray crossings are used for three rays cast from each point being tested, and a majority vote of the resulting polygon-crossings is used to decide whether the point lies inside or outside the hull.

Parameters:
[out]outputThe set of points that pass the 3D polygon hull filter.

Definition at line 175 of file crop_hull.hpp.

template<typename PointT >
void pcl::CropHull< PointT >::applyFilter3D ( std::vector< int > &  indices) [private]

Apply the three-dimensional hull filter. Polygon-ray crossings are used for three rays cast from each point being tested, and a majority vote of the resulting polygon-crossings is used to decide whether the point lies inside or outside the hull.

Parameters:
[out]indicesThe indices of the set of points that pass the 3D polygon hull filter.

Definition at line 211 of file crop_hull.hpp.

template<typename PointT>
PointCloudPtr pcl::CropHull< PointT >::getHullCloud ( ) const [inline]

Get the point cloud that the hull indices refer to.

Definition at line 103 of file crop_hull.h.

template<typename PointT >
Eigen::Vector3f pcl::CropHull< PointT >::getHullCloudRange ( ) [private]

Return the size of the hull point cloud in line with coordinate axes. This is used to choose the 2D projection to use when cropping to a 2d polygon.

Definition at line 95 of file crop_hull.hpp.

template<typename PointT>
std::vector<Vertices> pcl::CropHull< PointT >::getHullIndices ( ) const [inline]

Get the vertices of the hull used to filter points.

Definition at line 87 of file crop_hull.h.

template<typename PointT >
template<unsigned PlaneDim1, unsigned PlaneDim2>
bool pcl::CropHull< PointT >::isPointIn2DPolyWithVertIndices ( const PointT point,
const Vertices &  verts,
const PointCloud cloud 
) [inline, static, private]

Test an individual point against a 2D polygon. PlaneDim1 and PlaneDim2 specify the x/y/z coordinate axes to use.

Parameters:
[in]pointPoint to test against the polygon.
[in]vertsVertex indices of polygon.
[in]cloudCloud from which the vertex indices are drawn.

Definition at line 238 of file crop_hull.hpp.

template<typename PointT >
bool pcl::CropHull< PointT >::rayTriangleIntersect ( const PointT point,
const Eigen::Vector3f &  ray,
const Vertices &  verts,
const PointCloud cloud 
) [inline, static, private]

Does a ray cast from a point intersect with an arbitrary triangle in 3D? See: http://softsurfer.com/Archive/algorithm_0105/algorithm_0105.htm#intersect_RayTriangle()

Parameters:
[in]pointPoint from which the ray is cast.
[in]rayVector in direction of ray.
[in]vertsIndices of vertices making the polygon.
[in]cloudCloud from which the vertex indices are drawn.

Definition at line 280 of file crop_hull.hpp.

template<typename PointT>
void pcl::CropHull< PointT >::setCropOutside ( bool  crop_outside) [inline]

Remove points outside the hull (default), or those inside the hull.

Parameters:
[in]crop_outsideIf true, the filter will remove points outside the hull. If false, those inside will be removed.

Definition at line 125 of file crop_hull.h.

template<typename PointT>
void pcl::CropHull< PointT >::setDim ( int  dim) [inline]

Set the dimensionality of the hull to be used. This should be set to correspond to the dimensionality of the convex/concave hull produced by the pcl::ConvexHull and pcl::ConcaveHull classes.

Parameters:
[in]dimDimensionailty of the hull used to filter points.

Definition at line 115 of file crop_hull.h.

template<typename PointT>
void pcl::CropHull< PointT >::setHullCloud ( PointCloudPtr  points) [inline]

Set the point cloud that the hull indices refer to.

Parameters:
[in]pointsthe point cloud that the hull indices refer to

Definition at line 96 of file crop_hull.h.

template<typename PointT>
void pcl::CropHull< PointT >::setHullIndices ( const std::vector< Vertices > &  polygons) [inline]

Set the vertices of the hull used to filter points.

Parameters:
[in]polygonsVector of polygons (Vertices structures) forming the hull used for filtering points.

Definition at line 79 of file crop_hull.h.


Member Data Documentation

template<typename PointT>
bool pcl::CropHull< PointT >::crop_outside_ [private]

If true, the filter will remove points outside the hull. If false, those inside will be removed.

Definition at line 230 of file crop_hull.h.

template<typename PointT>
int pcl::CropHull< PointT >::dim_ [private]

The dimensionality of the hull to be used.

Definition at line 225 of file crop_hull.h.

template<typename PointT>
PointCloudPtr pcl::CropHull< PointT >::hull_cloud_ [private]

The point cloud that the hull indices refer to.

Definition at line 222 of file crop_hull.h.

template<typename PointT>
std::vector<pcl::Vertices> pcl::CropHull< PointT >::hull_polygons_ [private]

The vertices of the hull used to filter points.

Definition at line 219 of file crop_hull.h.


The documentation for this class was generated from the following files:


pcl
Author(s): Open Perception
autogenerated on Mon Oct 6 2014 03:19:17