Point Cloud Library (PCL)
1.9.1
|
38 #ifndef PCL_FILTER_FIELD_VAL_CONDITION_H_
39 #define PCL_FILTER_FIELD_VAL_CONDITION_H_
40 #include <pcl/common/eigen.h>
41 #include <pcl/filters/filter.h>
46 namespace ComparisonOps
59 template<
typename Po
intT>
87 template<
typename Po
intT>
91 typedef boost::shared_ptr< ComparisonBase<PointT> >
Ptr;
92 typedef boost::shared_ptr< const ComparisonBase<PointT> >
ConstPtr;
127 template<
typename Po
intT>
135 typedef boost::shared_ptr< FieldComparison<PointT> >
Ptr;
136 typedef boost::shared_ptr< const FieldComparison<PointT> >
ConstPtr;
192 template<
typename Po
intT>
199 typedef boost::shared_ptr< PackedRGBComparison<PointT> >
Ptr;
200 typedef boost::shared_ptr< const PackedRGBComparison<PointT> >
ConstPtr;
239 template<
typename Po
intT>
246 typedef boost::shared_ptr< PackedHSIComparison<PointT> >
Ptr;
247 typedef boost::shared_ptr< const PackedHSIComparison<PointT> >
ConstPtr;
308 template<
typename Po
intT>
312 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
314 typedef boost::shared_ptr<TfQuadraticXYZComparison<PointT> >
Ptr;
315 typedef boost::shared_ptr<const TfQuadraticXYZComparison<PointT> >
ConstPtr;
332 const Eigen::Vector3f &comparison_vector,
const float &comparison_scalar,
333 const Eigen::Affine3f &comparison_transform = Eigen::Affine3f::Identity ());
402 tf_comp_matr_ = transform.transpose () *
comp_matr_ * transform;
403 tf_comp_vect_ =
comp_vect_.transpose () * transform;
438 Eigen::Matrix4f tf_comp_matr_;
439 Eigen::Vector4f tf_comp_vect_;
444 template<
typename Po
intT>
452 typedef boost::shared_ptr<ConditionBase<PointT> >
Ptr;
453 typedef boost::shared_ptr<const ConditionBase<PointT> >
ConstPtr;
508 template<
typename Po
intT>
515 typedef boost::shared_ptr<ConditionAnd<PointT> >
Ptr;
516 typedef boost::shared_ptr<const ConditionAnd<PointT> >
ConstPtr;
536 template<
typename Po
intT>
543 typedef boost::shared_ptr<ConditionOr<PointT> >
Ptr;
544 typedef boost::shared_ptr<const ConditionOr<PointT> >
ConstPtr;
593 template<
typename Po
intT>
690 #ifdef PCL_NO_PRECOMPILE
691 #include <pcl/filters/impl/conditional_removal.hpp>
ConditionOr()
Constructor.
This file defines compatibility wrappers for low level I/O functions.
boost::shared_ptr< PointCloud< PointT > > Ptr
uint32_t offset_
The data offset.
A datatype that enables type-correct comparisons.
ComparisonBase()
Constructor.
A packed HSI specialization of the comparison object.
boost::shared_ptr< PackedRGBComparison< PointT > > Ptr
virtual bool evaluate(const PointT &point) const =0
Evaluate function.
virtual bool evaluate(const PointT &point) const
Determine the result of this comparison.
boost::shared_ptr< PackedHSIComparison< PointT > > Ptr
boost::shared_ptr< ConditionAnd< PointT > > Ptr
uint32_t rgb_offset_
The offset of the component.
boost::shared_ptr< const ConditionBase< PointT > > ConstPtr
The (abstract) base class for the comparison object.
bool isCapable() const
Check if evaluation requirements are met.
ComparisonBase::Ptr ComparisonBasePtr
bool capable_
True if capable.
boost::shared_ptr< const PackedRGBComparison< PointT > > ConstPtr
uint32_t offset_
The data offset.
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.
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.
boost::shared_ptr< const ComparisonBase< PointT > > ConstPtr
ConditionalRemoval(int extract_removed_indices=false)
the default constructor.
boost::shared_ptr< ConditionBase< PointT > > Ptr
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.
boost::shared_ptr< const TfQuadraticXYZComparison< PointT > > ConstPtr
boost::shared_ptr< ConditionOr< PointT > > Ptr
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.
pcl::ConditionBase< PointT > ConditionBase
A packed rgb specialization of the comparison object.
void addComparison(ComparisonBaseConstPtr comparison)
Add a new comparison.
ConditionBase::ConstPtr ConditionBaseConstPtr
void setCondition(ConditionBasePtr condition)
Set the condition that the filter will use.
virtual ~ComparisonBase()
Destructor.
virtual ~TfQuadraticXYZComparison()
Empty destructor.
virtual ~PackedHSIComparison()
Destructor.
uint8_t datatype_
The type of data.
bool isCapable() const
Return if the comparison is capable.
virtual ~PackedRGBComparison()
Destructor.
void setComparisonMatrix(const Eigen::Matrix4f &homogeneousMatrix)
set the matrix "A" of the comparison "p'Ap + 2v'p + c [OP] 0".
bool keep_organized_
Keep the structure of the data organized, by setting the filtered points to the a user given value (N...
PointCloud::Ptr PointCloudPtr
ConditionalRemoval filters data that satisfies certain conditions.
virtual bool evaluate(const PointT &point) const
Determine the result of this comparison.
void transformComparison(const Eigen::Matrix4f &transform)
transform the coordinate system of the comparison.
boost::shared_ptr< const ConditionOr< PointT > > ConstPtr
std::string field_name_
Field name to compare data on.
TfQuadraticXYZComparison()
Constructor.
virtual ~FieldComparison()
Destructor.
PointCloud::ConstPtr PointCloudConstPtr
void setUserFilterValue(float val)
Provide a value that the filtered points should be set to instead of removing them.
boost::shared_ptr< ComparisonBase< PointT > > Ptr
double compare_val_
All types (that we care about) can be represented as a double.
pcl::ComparisonBase< PointT > ComparisonBase
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef boost::shared_ptr< TfQuadraticXYZComparison< PointT > > Ptr
ConditionAnd()
Constructor.
boost::shared_ptr< const ConditionAnd< PointT > > ConstPtr
virtual bool evaluate(const PointT &point) const
Determine if a point meets this condition.
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.
virtual bool evaluate(const PointT &point) const
Determine the result of this comparison.
std::vector< Ptr > conditions_
The collection of all conditions that need to be verified.
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.
boost::shared_ptr< const PackedHSIComparison< PointT > > ConstPtr
boost::shared_ptr< FieldComparison< PointT > > Ptr
std::string component_name_
The name of the component.
std::string filter_name_
The filter name.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
Eigen::Matrix4f comp_matr_
virtual bool evaluate(const PointT &point) const
Determine the result of this comparison.
ComparisonBase::ConstPtr ComparisonBaseConstPtr
ConditionBase()
Constructor.
std::vector< ComparisonBaseConstPtr > comparisons_
The collection of all comparisons that need to be verified.
virtual bool evaluate(const PointT &point) const
Determine if a point meets this condition.
void setComparisonScalar(const float &scalar)
set the scalar "c" of the comparison "p'Ap + 2v'p + c [OP] 0".
uint32_t component_offset_
The offset of the component.
PointDataAtOffset(uint8_t datatype, uint32_t offset)
Constructor.
float user_filter_value_
User given value to be set to any filtered point.
ConditionBase::Ptr ConditionBasePtr
boost::shared_ptr< const FieldComparison< PointT > > ConstPtr
ComponentId component_id_
The ID of the component.
virtual ~ConditionBase()
Destructor.
void setComparisonMatrix(const Eigen::Matrix3f &matrix)
set the matrix "A" of the comparison "p'Ap + 2v'p + c [OP] 0".
void applyFilter(PointCloud &output)
Filter a Point Cloud.
FieldComparison(const FieldComparison &src)
Copy constructor.
The field-based specialization of the comparison object.
ConditionBasePtr condition_
The condition to use for filtering.