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

A packed rgb specialization of the comparison object. More...

#include <pcl/filters/conditional_removal.h>

Inheritance diagram for pcl::PackedRGBComparison< PointT >:

Public Types

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

Public Member Functions

 PackedRGBComparison (const std::string &component_name, ComparisonOps::CompareOp op, double compare_val)
 Construct a PackedRGBComparison.
 ~PackedRGBComparison () override=default
 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

std::string component_name_
 The name of the component.
std::uint32_t component_offset_
 The offset of the component.
double compare_val_
 All types (that we care about) can be represented as a double.
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::PackedRGBComparison< PointT >

A packed rgb specialization of the comparison object.

Definition at line 194 of file conditional_removal.h.

Member Typedef Documentation

◆ ConstPtr

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

Definition at line 201 of file conditional_removal.h.

◆ Ptr

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

Definition at line 200 of file conditional_removal.h.

Constructor & Destructor Documentation

◆ PackedRGBComparison()

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

Construct a PackedRGBComparison.

Parameters
component_nameeither "r", "g" or "b"
opthe operator to use when making the comparison
compare_valthe constant value to compare the component value too

Definition at line 133 of file conditional_removal.hpp.

References pcl::ComparisonBase< PointT >::capable_, compare_val_, component_name_, component_offset_, pcl::PCLPointField::FLOAT32, pcl::getFields(), pcl::PCLPointField::INT32, pcl::ComparisonBase< PointT >::op_, and pcl::PCLPointField::UINT32.

◆ ~PackedRGBComparison()

template<typename PointT>
pcl::PackedRGBComparison< PointT >::~PackedRGBComparison ( )
overridedefault

Destructor.

Member Function Documentation

◆ evaluate()

template<typename PointT>
bool pcl::PackedRGBComparison< 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 193 of file conditional_removal.hpp.

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

Member Data Documentation

◆ compare_val_

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

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

Definition at line 228 of file conditional_removal.h.

Referenced by evaluate(), and PackedRGBComparison().

◆ component_name_

template<typename PointT>
std::string pcl::PackedRGBComparison< PointT >::component_name_
protected

The name of the component.

Definition at line 222 of file conditional_removal.h.

Referenced by PackedRGBComparison().

◆ component_offset_

template<typename PointT>
std::uint32_t pcl::PackedRGBComparison< PointT >::component_offset_
protected

The offset of the component.

Definition at line 225 of file conditional_removal.h.

Referenced by evaluate(), and PackedRGBComparison().


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