Point Cloud Library (PCL) 1.15.0
Loading...
Searching...
No Matches
pcl::FieldComparison< PointT > Class Template Reference

The field-based specialization of the comparison object. More...

#include <pcl/filters/conditional_removal.h>

Inheritance diagram for pcl::FieldComparison< PointT >:
Collaboration diagram for pcl::FieldComparison< PointT >:

Public Types

using Ptr = shared_ptr<FieldComparison<PointT> >
using ConstPtr = shared_ptr<const FieldComparison<PointT> >
Public Types inherited from pcl::ComparisonBase< PointT >
using Ptr = shared_ptr<ComparisonBase<PointT> >
using ConstPtr = shared_ptr<const ComparisonBase<PointT> >

Public Member Functions

 FieldComparison (const std::string &field_name, ComparisonOps::CompareOp op, double compare_val)
 Construct a FieldComparison.
 FieldComparison (const FieldComparison &src)
 Copy constructor.
FieldComparisonoperator= (const FieldComparison &src)
 Copy operator.
 ~FieldComparison () override
 Destructor.
bool evaluate (const PointT &point) const override
 Determine the result of this comparison.
Public Member Functions inherited from pcl::ComparisonBase< PointT >
 ComparisonBase ()=default
 Constructor.
virtual ~ComparisonBase ()=default
 Destructor.
bool isCapable () const
 Return if the comparison is capable.

Protected Attributes

double compare_val_
 All types (that we care about) can be represented as a double.
PointDataAtOffset< PointT > * point_data_
 The point data to compare.
Protected Attributes inherited from pcl::ComparisonBase< PointT >
bool capable_ {false}
 True if capable.
std::string field_name_
 Field name to compare data on.
std::uint32_t offset_ {0}
 The data offset.
ComparisonOps::CompareOp op_ {ComparisonOps::GT}
 The comparison operator type.

Detailed Description

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

The field-based specialization of the comparison object.

Definition at line 129 of file conditional_removal.h.

Member Typedef Documentation

◆ ConstPtr

template<typename PointT>
using pcl::FieldComparison< PointT >::ConstPtr = shared_ptr<const FieldComparison<PointT> >

Definition at line 137 of file conditional_removal.h.

◆ Ptr

template<typename PointT>
using pcl::FieldComparison< PointT >::Ptr = shared_ptr<FieldComparison<PointT> >

Definition at line 136 of file conditional_removal.h.

Constructor & Destructor Documentation

◆ FieldComparison() [1/2]

template<typename PointT>
pcl::FieldComparison< PointT >::FieldComparison ( const std::string & field_name,
ComparisonOps::CompareOp op,
double compare_val )

Construct a FieldComparison.

Parameters
field_namethe name of the field that contains the data we want to compare
opthe operator to use when making the comparison
compare_valthe constant value to compare the field value too

Definition at line 49 of file conditional_removal.hpp.

References pcl::ComparisonBase< PointT >::capable_, compare_val_, pcl::ComparisonBase< PointT >::ComparisonBase(), pcl::ComparisonBase< PointT >::field_name_, pcl::getFields(), pcl::ComparisonBase< PointT >::op_, and point_data_.

Referenced by FieldComparison(), and operator=().

◆ FieldComparison() [2/2]

template<typename PointT>
pcl::FieldComparison< PointT >::FieldComparison ( const FieldComparison< PointT > & src)
inline

Copy constructor.

Parameters
[in]srcthe field comparison object to copy into this

Definition at line 150 of file conditional_removal.h.

References compare_val_, pcl::ComparisonBase< PointT >::ComparisonBase(), FieldComparison(), and point_data_.

◆ ~FieldComparison()

template<typename PointT>
pcl::FieldComparison< PointT >::~FieldComparison ( )
override

Destructor.

Definition at line 91 of file conditional_removal.hpp.

References point_data_.

Member Function Documentation

◆ evaluate()

template<typename PointT>
bool pcl::FieldComparison< PointT >::evaluate ( const PointT & point) const
overridevirtual

Determine the result of this comparison.


Parameters
pointthe point to evaluate
Returns
the result of this comparison.

Implements pcl::ComparisonBase< PointT >.

Definition at line 98 of file conditional_removal.hpp.

References pcl::ComparisonBase< PointT >::capable_, compare_val_, pcl::ComparisonOps::EQ, pcl::ComparisonOps::GE, pcl::ComparisonOps::GT, pcl::ComparisonOps::LE, pcl::ComparisonOps::LT, pcl::ComparisonBase< PointT >::op_, and point_data_.

◆ operator=()

template<typename PointT>
FieldComparison & pcl::FieldComparison< PointT >::operator= ( const FieldComparison< PointT > & src)
inline

Copy operator.

Parameters
[in]srcthe field comparison object to copy into this

Definition at line 160 of file conditional_removal.h.

References compare_val_, FieldComparison(), and point_data_.

Member Data Documentation

◆ compare_val_

template<typename PointT>
double pcl::FieldComparison< PointT >::compare_val_
protected

All types (that we care about) can be represented as a double.

Definition at line 179 of file conditional_removal.h.

Referenced by evaluate(), FieldComparison(), FieldComparison(), and operator=().

◆ point_data_

template<typename PointT>
PointDataAtOffset<PointT>* pcl::FieldComparison< PointT >::point_data_
protected

The point data to compare.

Definition at line 182 of file conditional_removal.h.

Referenced by evaluate(), FieldComparison(), FieldComparison(), operator=(), and ~FieldComparison().


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