Loading...
Searching...
No Matches
pcl::Comparator< PointT > Class Template Referenceabstract

Comparator is the base class for comparators that compare two points given some function. More...

`#include <pcl/segmentation/comparator.h>`

Inheritance diagram for pcl::Comparator< PointT >:

## Public Types

using | PointCloud = pcl::PointCloud< PointT >
using | PointCloudPtr = typename PointCloud::Ptr
using | PointCloudConstPtr = typename PointCloud::ConstPtr
using | Ptr = shared_ptr< Comparator< PointT > >
using | ConstPtr = shared_ptr< const Comparator< PointT > >

## Public Member Functions

| Comparator ()
| Empty constructor for comparator.
virtual | ~Comparator ()=default
| Empty destructor for comparator.
virtual void | setInputCloud (const PointCloudConstPtr &cloud)
| Set the input cloud for the comparator.
virtual PointCloudConstPtr | getInputCloud () const
| Get the input cloud this comparator operates on.
virtual bool | compare (int idx1, int idx2) const =0
| Compares the two points in the input cloud designated by these two indices.

## Protected Attributes

PointCloudConstPtr | input_

## Detailed Description

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

Comparator is the base class for comparators that compare two points given some function.

Currently intended for use with OrganizedConnectedComponentSegmentation

Author
  Alex Trevor

Definition at line 54 of file comparator.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointT >

using pcl::Comparator< PointT >::ConstPtr = shared_ptr<const Comparator<PointT> >

Definition at line 62 of file comparator.h.

## PointCloud

template<typename PointT >

using pcl::Comparator< PointT >::PointCloud = pcl::PointCloud<PointT>

Definition at line 57 of file comparator.h.

## PointCloudConstPtr

template<typename PointT >

using pcl::Comparator< PointT >::PointCloudConstPtr = typename PointCloud::ConstPtr

Definition at line 59 of file comparator.h.

## PointCloudPtr

template<typename PointT >

using pcl::Comparator< PointT >::PointCloudPtr = typename PointCloud::Ptr

Definition at line 58 of file comparator.h.

## Ptr

template<typename PointT >

using pcl::Comparator< PointT >::Ptr = shared_ptr<Comparator<PointT> >

Definition at line 61 of file comparator.h.

## Constructor & Destructor Documentation

## Comparator()

template<typename PointT >

pcl::Comparator< PointT >::Comparator | ( |  | ) |

inline

Empty constructor for comparator.

Definition at line 65 of file comparator.h.

## ~Comparator()

template<typename PointT >

virtual pcl::Comparator< PointT >::~Comparator | ( |  | ) |

virtual default

Empty destructor for comparator.

## Member Function Documentation

## compare()

template<typename PointT >

virtual bool pcl::Comparator< PointT >::compare | ( | int | idx1,
|  | int | idx2
| ) |  | const

pure virtual

Compares the two points in the input cloud designated by these two indices.

This is pure virtual and must be implemented by subclasses with some comparison function.

Parameters

  [in] | idx1 | the index of the first point.
  [in] | idx2 | the index of the second point.

Implemented in pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::EuclideanClusterComparator< PointT, PointLT >, pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >, pcl::GroundPlaneComparator< PointT, PointNT >, pcl::PlaneCoefficientComparator< PointT, PointNT >, pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, and pcl::RGBPlaneCoefficientComparator< PointT, PointNT >.

## getInputCloud()

template<typename PointT >

virtual PointCloudConstPtr pcl::Comparator< PointT >::getInputCloud | ( |  | ) | const

inline virtual

Get the input cloud this comparator operates on.

Definition at line 84 of file comparator.h.

References pcl::Comparator< PointT >::input_.

## setInputCloud()

template<typename PointT >

virtual void pcl::Comparator< PointT >::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) |

inline virtual

Set the input cloud for the comparator.

Parameters

  [in] | cloud | the point cloud this comparator will operate on

Reimplemented in pcl::EuclideanClusterComparator< PointT, PointLT >, pcl::GroundPlaneComparator< PointT, PointNT >, and pcl::PlaneCoefficientComparator< PointT, PointNT >.

Definition at line 77 of file comparator.h.

References pcl::Comparator< PointT >::input_.

## Member Data Documentation

## input_

template<typename PointT >

PointCloudConstPtr pcl::Comparator< PointT >::input_

protected

Definition at line 98 of file comparator.h.

Referenced by pcl::EuclideanClusterComparator< PointT, PointLT >::compare(), pcl::Comparator< PointT >::getInputCloud(), pcl::Comparator< PointT >::setInputCloud(), pcl::EuclideanClusterComparator< PointT, PointLT >::setInputCloud(), pcl::GroundPlaneComparator< PointT, PointNT >::setInputCloud(), and pcl::PlaneCoefficientComparator< PointT, PointNT >::setInputCloud().

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

- pcl/segmentation/comparator.h