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>
630 PCL_DEPRECATED (
"ConditionalRemoval(ConditionBasePtr condition, bool extract_removed_indices = false) is deprecated, " 631 "please use the setCondition (ConditionBasePtr condition) function instead.")
705 #ifdef PCL_NO_PRECOMPILE 706 #include <pcl/filters/impl/conditional_removal.hpp> void setComparisonMatrix(const Eigen::Matrix3f &matrix)
set the matrix "A" of the comparison "p'Ap + 2v'p + c [OP] 0".
A comparison whether the (x,y,z) components of a given point satisfy (p'Ap + 2v'p + c [OP] 0)...
ComparisonBase()
Constructor.
double compare_val_
All types (that we care about) can be represented as a double.
ComparisonBase::ConstPtr ComparisonBaseConstPtr
double compare_val_
All types (that we care about) can be represented as a double.
virtual bool evaluate(const PointT &point) const =0
Evaluate function.
boost::shared_ptr< const PackedHSIComparison< PointT > > ConstPtr
ComparisonBase::Ptr ComparisonBasePtr
PointCloud::ConstPtr PointCloudConstPtr
virtual ~PackedHSIComparison()
Destructor.
virtual bool evaluate(const PointT &point) const
Determine the result of this comparison.
uint32_t offset_
The data offset.
PointDataAtOffset< PointT > * point_data_
The point data to compare.
void setKeepOrganized(bool val)
Set whether the filtered points should be kept and set to the value given through setUserFilterValue ...
boost::shared_ptr< PackedRGBComparison< PointT > > Ptr
ComponentId component_id_
The ID of the component.
boost::shared_ptr< ConditionOr< PointT > > Ptr
uint32_t rgb_offset_
The offset of the component.
FieldComparison & operator=(const FieldComparison &src)
Copy operator.
std::string component_name_
The name of the component.
bool capable_
True if capable.
void setComparisonOperator(const pcl::ComparisonOps::CompareOp op)
set the operator "[OP]" of the comparison "p'Ap + 2v'p + c [OP] 0".
void setUserFilterValue(float val)
Provide a value that the filtered points should be set to instead of removing them.
uint32_t offset_
The data offset.
ConditionAnd()
Constructor.
boost::shared_ptr< ConditionAnd< PointT > > Ptr
boost::shared_ptr< const TfQuadraticXYZComparison< PointT > > ConstPtr
A datatype that enables type-correct comparisons.
uint8_t datatype_
The type of data.
void setCondition(ConditionBasePtr condition)
Set the condition that the filter will use.
float user_filter_value_
User given value to be set to any filtered point.
void transformComparison(const Eigen::Affine3f &transform)
transform the coordinate system of the comparison.
bool isCapable() const
Check if evaluation requirements are met.
virtual bool evaluate(const PointT &point) const
Determine the result of this comparison.
The (abstract) base class for the comparison object.
void setComparisonVector(const Eigen::Vector3f &vector)
set the vector "v" of the comparison "p'Ap + 2v'p + c [OP] 0".
virtual bool evaluate(const PointT &point) const
Determine the result of this comparison.
ConditionOr()
Constructor.
virtual ~PackedRGBComparison()
Destructor.
void setComparisonVector(const Eigen::Vector4f &homogeneousVector)
set the vector "v" of the comparison "p'Ap + 2v'p + c [OP] 0".
pcl::ConditionBase< PointT > ConditionBase
boost::shared_ptr< const ComparisonBase< PointT > > ConstPtr
ComparisonOps::CompareOp op_
The comparison operator type.
boost::shared_ptr< FieldComparison< PointT > > Ptr
ConditionalRemoval(int extract_removed_indices=false)
the default constructor.
virtual bool evaluate(const PointT &point) const
Determine the result of this comparison.
PointDataAtOffset(uint8_t datatype, uint32_t offset)
Constructor.
virtual bool evaluate(const PointT &point) const =0
Determine if a point meets this condition.
ConditionalRemoval filters data that satisfies certain conditions.
boost::shared_ptr< PointCloud< PointT > > Ptr
virtual ~TfQuadraticXYZComparison()
Empty destructor.
PointCloud::Ptr PointCloudPtr
bool capable_
True if capable.
Filter represents the base filter class.
boost::shared_ptr< PackedHSIComparison< PointT > > Ptr
int compare(const PointT &p, const double &val)
Compare function.
virtual ~ComparisonBase()
Destructor.
ConditionBasePtr condition_
The condition to use for filtering.
bool isCapable() const
Return if the comparison is capable.
boost::shared_ptr< const ConditionBase< PointT > > ConstPtr
Eigen::Vector4f comp_vect_
The field-based specialization of the comparison object.
boost::shared_ptr< const FieldComparison< PointT > > ConstPtr
void setComparisonMatrix(const Eigen::Matrix4f &homogeneousMatrix)
set the matrix "A" of the comparison "p'Ap + 2v'p + c [OP] 0".
A packed rgb specialization of the comparison object.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef boost::shared_ptr< TfQuadraticXYZComparison< PointT > > Ptr
bool capable_
True if capable.
std::string component_name_
The name of the component.
bool keep_organized_
Keep the structure of the data organized, by setting the filtered points to the a user given value (N...
uint32_t component_offset_
The offset of the component.
virtual bool evaluate(const PointT &point) const
Determine if a point meets this condition.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
void transformComparison(const Eigen::Matrix4f &transform)
transform the coordinate system of the comparison.
std::string field_name_
Field name to compare data on.
CompareOp
The kind of comparison operations that are possible within a comparison object.
TfQuadraticXYZComparison()
Constructor.
pcl::ComparisonBase< PointT > ComparisonBase
PointCloud represents the base class in PCL for storing collections of 3D points. ...
void setComparisonScalar(const float &scalar)
set the scalar "c" of the comparison "p'Ap + 2v'p + c [OP] 0".
ConditionBase()
Constructor.
ConditionBase::ConstPtr ConditionBaseConstPtr
void applyFilter(PointCloud &output)
Filter a Point Cloud.
void addCondition(Ptr condition)
Add a nested condition to this condition.
boost::shared_ptr< const ConditionAnd< PointT > > ConstPtr
boost::shared_ptr< ComparisonBase< PointT > > Ptr
FieldComparison(const FieldComparison &src)
Copy constructor.
Eigen::Matrix4f comp_matr_
bool getKeepOrganized() const
void addComparison(ComparisonBaseConstPtr comparison)
Add a new comparison.
boost::shared_ptr< const ConditionOr< PointT > > ConstPtr
double compare_val_
All types (that we care about) can be represented as a double.
std::vector< ComparisonBaseConstPtr > comparisons_
The collection of all comparisons that need to be verified.
ConditionBase::Ptr ConditionBasePtr
A packed HSI specialization of the comparison object.
virtual ~ConditionBase()
Destructor.
std::string filter_name_
The filter name.
A point structure representing Euclidean xyz coordinates, and the RGB color.
virtual ~FieldComparison()
Destructor.
std::vector< Ptr > conditions_
The collection of all conditions that need to be verified.
boost::shared_ptr< ConditionBase< PointT > > Ptr
virtual bool evaluate(const PointT &point) const
Determine if a point meets this condition.
boost::shared_ptr< const PackedRGBComparison< PointT > > ConstPtr