Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::pcl_utils::PolygonComparison< PointT > Class Template Reference

Check if point is inside or outside a given polygon. More...

#include <comparisons.h>

List of all members.

Public Types

typedef boost::shared_ptr
< PolygonComparison< PointT > > 
Ptr
 Shared pointer.
typedef boost::shared_ptr
< const PolygonComparison
< PointT > > 
ConstPtr
 Constant shared pointer.

Public Member Functions

 PolygonComparison (const pcl::PointCloud< PointT > &polygon, bool inside=true)
 Constructor.
virtual ~PolygonComparison ()
 Virtual empty destructor.
virtual bool evaluate (const PointT &point) const
 Evaluate for given pixel.

Protected Attributes

bool inside_
 Flag to determine whether to do inside or outside check.
const pcl::PointCloud< PointT > & polygon_
 The polygon to check against.

Detailed Description

template<typename PointT>
class fawkes::pcl_utils::PolygonComparison< PointT >

Check if point is inside or outside a given polygon.

This comparison determines if a given point is inside or outside a given polygon. A flag can be set to have an inside or outside check. The class uses pcl::isPointIn2DPolygon() to determine if the point is inside the polygon. Not that we assume planar data, for example points projected into a segmented plane.

Author:
Tim Niemueller

Definition at line 47 of file comparisons.h.


Member Typedef Documentation

template<typename PointT>
typedef boost::shared_ptr<const PolygonComparison<PointT> > fawkes::pcl_utils::PolygonComparison< PointT >::ConstPtr

Constant shared pointer.

Definition at line 54 of file comparisons.h.

template<typename PointT>
typedef boost::shared_ptr<PolygonComparison<PointT> > fawkes::pcl_utils::PolygonComparison< PointT >::Ptr

Shared pointer.

Definition at line 52 of file comparisons.h.


Constructor & Destructor Documentation

template<typename PointT>
fawkes::pcl_utils::PolygonComparison< PointT >::PolygonComparison ( const pcl::PointCloud< PointT > &  polygon,
bool  inside = true 
)
inline

Constructor.

Parameters:
polygonpolygon to compare against, it must have at least three points
insideif true filter points inside the polygon, false for outside

Definition at line 60 of file comparisons.h.

template<typename PointT>
virtual fawkes::pcl_utils::PolygonComparison< PointT >::~PolygonComparison ( )
inlinevirtual

Virtual empty destructor.

Definition at line 66 of file comparisons.h.


Member Function Documentation

template<typename PointT>
virtual bool fawkes::pcl_utils::PolygonComparison< PointT >::evaluate ( const PointT &  point) const
inlinevirtual

Evaluate for given pixel.

Parameters:
pointpoint to compare
Returns:
true if the point is inside/outside (depending on constructor parameter) the polygon, false otherwise

Definition at line 73 of file comparisons.h.


Member Data Documentation

template<typename PointT>
bool fawkes::pcl_utils::PolygonComparison< PointT >::inside_
protected

Flag to determine whether to do inside or outside check.

Definition at line 83 of file comparisons.h.

template<typename PointT>
const pcl::PointCloud<PointT>& fawkes::pcl_utils::PolygonComparison< PointT >::polygon_
protected

The polygon to check against.

Definition at line 85 of file comparisons.h.


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