Point Cloud Library (PCL)
1.11.1-dev
|
41 #include <pcl/pcl_config.h>
42 #include <pcl/filters/filter.h>
47 namespace ComparisonOps
60 template<
typename Po
intT>
88 template<
typename Po
intT>
92 using Ptr = shared_ptr<ComparisonBase<PointT> >;
93 using ConstPtr = shared_ptr<const ComparisonBase<PointT> >;
128 template<
typename Po
intT>
136 using Ptr = shared_ptr<FieldComparison<PointT> >;
137 using ConstPtr = shared_ptr<const FieldComparison<PointT> >;
193 template<
typename Po
intT>
200 using Ptr = shared_ptr<PackedRGBComparison<PointT> >;
201 using ConstPtr = shared_ptr<const PackedRGBComparison<PointT> >;
240 template<
typename Po
intT>
247 using Ptr = shared_ptr<PackedHSIComparison<PointT> >;
248 using ConstPtr = shared_ptr<const PackedHSIComparison<PointT> >;
309 template<
typename Po
intT>
315 using Ptr = shared_ptr<TfQuadraticXYZComparison<PointT> >;
316 using ConstPtr = shared_ptr<const TfQuadraticXYZComparison<PointT> >;
333 const Eigen::Vector3f &comparison_vector,
const float &comparison_scalar,
334 const Eigen::Affine3f &comparison_transform = Eigen::Affine3f::Identity ());
403 tf_comp_matr_ = transform.transpose () *
comp_matr_ * transform;
404 tf_comp_vect_ =
comp_vect_.transpose () * transform;
439 Eigen::Matrix4f tf_comp_matr_;
440 Eigen::Vector4f tf_comp_vect_;
445 template<
typename Po
intT>
453 using Ptr = shared_ptr<ConditionBase<PointT> >;
454 using ConstPtr = shared_ptr<const ConditionBase<PointT> >;
502 template<
typename Po
intT>
509 using Ptr = shared_ptr<ConditionAnd<PointT> >;
510 using ConstPtr = shared_ptr<const ConditionAnd<PointT> >;
530 template<
typename Po
intT>
537 using Ptr = shared_ptr<ConditionOr<PointT> >;
538 using ConstPtr = shared_ptr<const ConditionOr<PointT> >;
589 template<
typename Po
intT>
686 #ifdef PCL_NO_PRECOMPILE
687 #include <pcl/filters/impl/conditional_removal.hpp>
ConditionOr()
Constructor.
shared_ptr< ConditionBase< PointT > > Ptr
A datatype that enables type-correct comparisons.
ComparisonBase()
Constructor.
A packed HSI specialization of the comparison object.
typename PointCloud::ConstPtr PointCloudConstPtr
std::uint32_t offset_
The data offset.
typename PointCloud::Ptr PointCloudPtr
virtual bool evaluate(const PointT &point) const =0
Evaluate function.
typename ConditionBase::Ptr ConditionBasePtr
PointDataAtOffset(std::uint8_t datatype, std::uint32_t offset)
Constructor.
shared_ptr< ComparisonBase< PointT > > Ptr
shared_ptr< const ConditionBase< PointT > > ConstPtr
The (abstract) base class for the comparison object.
bool isCapable() const
Check if evaluation requirements are met.
bool capable_
True if capable.
std::string component_name_
The name of the component.
void setComparisonVector(const Eigen::Vector4f &homogeneousVector)
set the vector "v" of the comparison "p'Ap + 2v'p + c [OP] 0".
bool capable_
True if capable.
std::uint8_t datatype_
The type of data.
bool getKeepOrganized() const
void transformComparison(const Eigen::Affine3f &transform)
transform the coordinate system of the comparison.
virtual bool evaluate(const PointT &point) const =0
Determine if a point meets this condition.
ComparisonOps::CompareOp op_
The comparison operator type.
PointCloud represents the base class in PCL for storing collections of 3D points.
ConditionalRemoval(int extract_removed_indices=false)
the default constructor.
void setComparisonVector(const Eigen::Vector3f &vector)
set the vector "v" of the comparison "p'Ap + 2v'p + c [OP] 0".
bool capable_
True if capable.
A point structure representing Euclidean xyz coordinates, and the RGB color.
double compare_val_
All types (that we care about) can be represented as a double.
bool evaluate(const PointT &point) const override
Determine the result of this comparison.
CompareOp
The kind of comparison operations that are possible within a comparison object.
void setComparisonOperator(const pcl::ComparisonOps::CompareOp op)
set the operator "[OP]" of the comparison "p'Ap + 2v'p + c [OP] 0".
int compare(const PointT &p, const double &val)
Compare function.
void addCondition(Ptr condition)
Add a nested condition to this condition.
double compare_val_
All types (that we care about) can be represented as a double.
~TfQuadraticXYZComparison()
Empty destructor.
A packed rgb specialization of the comparison object.
void addComparison(ComparisonBaseConstPtr comparison)
Add a new comparison.
std::uint32_t offset_
The data offset.
void setCondition(ConditionBasePtr condition)
Set the condition that the filter will use.
virtual ~ComparisonBase()
Destructor.
bool evaluate(const PointT &point) const override
Determine if a point meets this condition.
bool isCapable() const
Return if the comparison is capable.
void setComparisonMatrix(const Eigen::Matrix4f &homogeneousMatrix)
set the matrix "A" of the comparison "p'Ap + 2v'p + c [OP] 0".
bool evaluate(const PointT &point) const override
Determine the result of this comparison.
bool keep_organized_
Keep the structure of the data organized, by setting the filtered points to the a user given value (N...
~PackedHSIComparison()
Destructor.
ConditionalRemoval filters data that satisfies certain conditions.
void transformComparison(const Eigen::Matrix4f &transform)
transform the coordinate system of the comparison.
std::uint32_t component_offset_
The offset of the component.
std::string field_name_
Field name to compare data on.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
TfQuadraticXYZComparison()
Constructor.
~FieldComparison()
Destructor.
void setUserFilterValue(float val)
Provide a value that the filtered points should be set to instead of removing them.
double compare_val_
All types (that we care about) can be represented as a double.
ConditionAnd()
Constructor.
void setKeepOrganized(bool val)
Set whether the filtered points should be kept and set to the value given through setUserFilterValue ...
Filter represents the base filter class.
typename ConditionBase::ConstPtr ConditionBaseConstPtr
std::vector< Ptr > conditions_
The collection of all conditions that need to be verified.
typename ComparisonBase::Ptr ComparisonBasePtr
Eigen::Vector4f comp_vect_
A comparison whether the (x,y,z) components of a given point satisfy (p'Ap + 2v'p + c [OP] 0).
PointDataAtOffset< PointT > * point_data_
The point data to compare.
FieldComparison & operator=(const FieldComparison &src)
Copy operator.
~PackedRGBComparison()
Destructor.
void applyFilter(PointCloud &output) override
Filter a Point Cloud.
std::string component_name_
The name of the component.
std::string filter_name_
The filter name.
shared_ptr< PointCloud< PointT > > Ptr
bool evaluate(const PointT &point) const override
Determine the result of this comparison.
virtual ~ConditionBase()=default
Destructor.
Eigen::Matrix4f comp_matr_
bool evaluate(const PointT &point) const override
Determine the result of this comparison.
ConditionBase()
Constructor.
std::vector< ComparisonBaseConstPtr > comparisons_
The collection of all comparisons that need to be verified.
void setComparisonScalar(const float &scalar)
set the scalar "c" of the comparison "p'Ap + 2v'p + c [OP] 0".
shared_ptr< const PointCloud< PointT > > ConstPtr
shared_ptr< const ComparisonBase< PointT > > ConstPtr
std::uint32_t rgb_offset_
The offset of the component.
float user_filter_value_
User given value to be set to any filtered point.
bool evaluate(const PointT &point) const override
Determine if a point meets this condition.
ComponentId component_id_
The ID of the component.
Defines functions, macros and traits for allocating and using memory.
void setComparisonMatrix(const Eigen::Matrix3f &matrix)
set the matrix "A" of the comparison "p'Ap + 2v'p + c [OP] 0".
typename ComparisonBase::ConstPtr ComparisonBaseConstPtr
FieldComparison(const FieldComparison &src)
Copy constructor.
The field-based specialization of the comparison object.
ConditionBasePtr condition_
The condition to use for filtering.