Point Cloud Library (PCL)  1.7.0
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
pcl::ConditionalRemoval< PointT > Class Template Reference

ConditionalRemoval filters data that satisfies certain conditions. More...

#include <pcl/filters/conditional_removal.h>

+ Inheritance diagram for pcl::ConditionalRemoval< PointT >:

List of all members.

Public Types

typedef pcl::ConditionBase
< PointT
ConditionBase
typedef ConditionBase::Ptr ConditionBasePtr
typedef ConditionBase::ConstPtr ConditionBaseConstPtr

Public Member Functions

 ConditionalRemoval (int extract_removed_indices=false)
 the default constructor.
 ConditionalRemoval (ConditionBasePtr condition, bool extract_removed_indices=false)
 a constructor that includes the condition.
void setKeepOrganized (bool val)
 Set whether the filtered points should be kept and set to the value given through setUserFilterValue (default: NaN), or removed from the PointCloud, thus potentially breaking its organized structure.
bool getKeepOrganized () const
void setUserFilterValue (float val)
 Provide a value that the filtered points should be set to instead of removing them.
void setCondition (ConditionBasePtr condition)
 Set the condition that the filter will use.

Protected Types

typedef pcl::traits::fieldList
< PointT >::type 
FieldList

Protected Member Functions

void applyFilter (PointCloud &output)
 Filter a Point Cloud.

Protected Attributes

bool capable_
 True if capable.
bool keep_organized_
 Keep the structure of the data organized, by setting the filtered points to the a user given value (NaN by default).
ConditionBasePtr condition_
 The condition to use for filtering.
float user_filter_value_
 User given value to be set to any filtered point.

Detailed Description

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

ConditionalRemoval filters data that satisfies certain conditions.

A ConditionalRemoval must be provided a condition. There are two types of conditions: ConditionAnd and ConditionOr. Conditions require one or more comparisons and/or other conditions. A comparison has a name, a comparison operator, and a value.

An ConditionAnd will evaluate to true when ALL of its encapsulated comparisons and conditions are true.

An ConditionOr will evaluate to true when ANY of its encapsulated comparisons and conditions are true.

Depending on the derived type of the comparison, the name can correspond to a PointCloud field name, or a color component in rgb color space or hsi color space.

Here is an example usage: // Build the condition pcl::ConditionAnd<PointT>::Ptr range_cond (new pcl::ConditionAnd<PointT> ()); range_cond->addComparison (pcl::FieldComparison<PointT>::Ptr (new pcl::FieldComparison<PointT>("z", pcl::ComparisonOps::LT, 2.0))); range_cond->addComparison (pcl::FieldComparison<PointT>::Ptr (new pcl::FieldComparison<PointT>("z", pcl::ComparisonOps::GT, 0.0))); // Build the filter pcl::ConditionalRemoval<PointT> range_filt; range_filt.setCondition (range_cond); range_filt.setKeepOrganized (false);

Author:
Louis LeGrand, Intel Labs Seattle

Definition at line 594 of file conditional_removal.h.


Member Typedef Documentation

template<typename PointT >
typedef pcl::ConditionBase<PointT> pcl::ConditionalRemoval< PointT >::ConditionBase

Definition at line 608 of file conditional_removal.h.

Definition at line 610 of file conditional_removal.h.

template<typename PointT >
typedef ConditionBase::Ptr pcl::ConditionalRemoval< PointT >::ConditionBasePtr

Definition at line 609 of file conditional_removal.h.

template<typename PointT >
typedef pcl::traits::fieldList<PointT>::type pcl::ConditionalRemoval< PointT >::FieldList [protected]

Definition at line 685 of file conditional_removal.h.


Constructor & Destructor Documentation

template<typename PointT >
pcl::ConditionalRemoval< PointT >::ConditionalRemoval ( int  extract_removed_indices = false) [inline]

the default constructor.

All ConditionalRemovals require a condition which can be set using the setCondition method

Parameters:
extract_removed_indicesextract filtered indices from indices vector

Definition at line 618 of file conditional_removal.h.

References pcl::Filter< PointT >::filter_name_.

template<typename PointT >
pcl::ConditionalRemoval< PointT >::ConditionalRemoval ( ConditionBasePtr  condition,
bool  extract_removed_indices = false 
) [inline]

a constructor that includes the condition.

Parameters:
conditionthe condition that each point must satisfy to avoid being removed by the filter
extract_removed_indicesextract filtered indices from indices vector

Definition at line 630 of file conditional_removal.h.

References pcl::Filter< PointT >::filter_name_, and pcl::ConditionalRemoval< PointT >::setCondition().


Member Function Documentation

template<typename PointT >
void pcl::ConditionalRemoval< PointT >::applyFilter ( PointCloud output) [protected, virtual]
template<typename PointT >
bool pcl::ConditionalRemoval< PointT >::getKeepOrganized ( ) const [inline]
template<typename PointT >
void pcl::ConditionalRemoval< PointT >::setCondition ( ConditionBasePtr  condition)

Set the condition that the filter will use.

Parameters:
conditioneach point must satisfy this condition to avoid being removed by the filter

All ConditionalRemovals require a condition

Definition at line 662 of file conditional_removal.hpp.

Referenced by pcl::ConditionalRemoval< PointT >::ConditionalRemoval().

template<typename PointT >
void pcl::ConditionalRemoval< PointT >::setKeepOrganized ( bool  val) [inline]

Set whether the filtered points should be kept and set to the value given through setUserFilterValue (default: NaN), or removed from the PointCloud, thus potentially breaking its organized structure.

By default, points are removed.

Parameters:
valset to true whether the filtered points should be kept and set to a given user value (default: NaN)

Definition at line 647 of file conditional_removal.h.

References pcl::ConditionalRemoval< PointT >::keep_organized_.

template<typename PointT >
void pcl::ConditionalRemoval< PointT >::setUserFilterValue ( float  val) [inline]

Provide a value that the filtered points should be set to instead of removing them.

Used in conjunction with setKeepOrganized ().

Parameters:
valthe user given value that the filtered point dimensions should be set to

Definition at line 664 of file conditional_removal.h.

References pcl::ConditionalRemoval< PointT >::user_filter_value_.


Member Data Documentation

template<typename PointT >
bool pcl::ConditionalRemoval< PointT >::capable_ [protected]

True if capable.

Definition at line 688 of file conditional_removal.h.

template<typename PointT >
ConditionBasePtr pcl::ConditionalRemoval< PointT >::condition_ [protected]

The condition to use for filtering.

Definition at line 696 of file conditional_removal.h.

template<typename PointT >
bool pcl::ConditionalRemoval< PointT >::keep_organized_ [protected]

Keep the structure of the data organized, by setting the filtered points to the a user given value (NaN by default).

Definition at line 693 of file conditional_removal.h.

Referenced by pcl::ConditionalRemoval< PointT >::getKeepOrganized(), and pcl::ConditionalRemoval< PointT >::setKeepOrganized().

template<typename PointT >
float pcl::ConditionalRemoval< PointT >::user_filter_value_ [protected]

User given value to be set to any filtered point.

Casted to the correct field type.

Definition at line 701 of file conditional_removal.h.

Referenced by pcl::ConditionalRemoval< PointT >::setUserFilterValue().


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