Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
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 >:
Inheritance graph
[legend]
Collaboration diagram for pcl::ConditionalRemoval< PointT >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef pcl::ConditionBase
< PointT
ConditionBase
typedef ConditionBase::Ptr ConditionBasePtr
typedef ConditionBase::ConstPtr ConditionBaseConstPtr
typedef boost::shared_ptr
< Filter< PointT > > 
Ptr
typedef boost::shared_ptr
< const Filter< PointT > > 
ConstPtr
typedef PointIndices::Ptr PointIndicesPtr
typedef PointIndices::ConstPtr PointIndicesConstPtr

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.
IndicesConstPtr const getRemovedIndices ()
 Get the point indices being removed.
void filter (PointCloud &output)
 Calls the filtering method and returns the filtered dataset in output.
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset.
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud.
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used.
const PointToperator[] (size_t pos)
 Override PointCloud operator[] to shorten code.

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 575 of file conditional_removal.h.


Member Typedef Documentation

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

Definition at line 589 of file conditional_removal.h.

Definition at line 591 of file conditional_removal.h.

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

Definition at line 590 of file conditional_removal.h.

template<typename PointT>
typedef boost::shared_ptr< const Filter<PointT> > pcl::Filter< PointT >::ConstPtr [inherited]

Definition at line 76 of file filter.h.

template<typename PointT>
typedef PointIndices::ConstPtr pcl::PCLBase< PointT >::PointIndicesConstPtr [inherited]
template<typename PointT>
typedef PointIndices::Ptr pcl::PCLBase< PointT >::PointIndicesPtr [inherited]
template<typename PointT>
typedef boost::shared_ptr< Filter<PointT> > pcl::Filter< PointT >::Ptr [inherited]

Definition at line 75 of file filter.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 599 of file conditional_removal.h.

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 611 of file conditional_removal.h.


Member Function Documentation

template<typename PointT>
void pcl::Filter< PointT >::filter ( PointCloud output) [inline, inherited]

Calls the filtering method and returns the filtered dataset in output.

Parameters:
[out]outputthe resultant filtered point cloud dataset

Reimplemented in pcl::FilterIndices< PointT >.

Definition at line 104 of file filter.h.

template<typename PointT>
IndicesPtr const pcl::PCLBase< PointT >::getIndices ( ) [inline, inherited]

Get a pointer to the vector of indices used.

Definition at line 190 of file pcl_base.h.

template<typename PointT>
PointCloudConstPtr const pcl::PCLBase< PointT >::getInputCloud ( ) [inline, inherited]

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointT >
bool pcl::ConditionalRemoval< PointT >::getKeepOrganized ( ) const [inline]

Definition at line 634 of file conditional_removal.h.

template<typename PointT>
IndicesConstPtr const pcl::Filter< PointT >::getRemovedIndices ( ) [inline, inherited]

Get the point indices being removed.

Reimplemented in pcl::FilterIndices< PointT >.

Definition at line 95 of file filter.h.

template<typename PointT>
const PointT& pcl::PCLBase< PointT >::operator[] ( size_t  pos) [inline, inherited]

Override PointCloud operator[] to shorten code.

Note:
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters:
posposition in indices_ vector

Definition at line 197 of file pcl_base.h.

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 663 of file conditional_removal.hpp.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const IndicesPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 113 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const IndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 124 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const PointIndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 135 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( size_t  row_start,
size_t  col_start,
size_t  nb_rows,
size_t  nb_cols 
) [inline, inherited]

Set the indices for the points laying within an interest region of the point cloud.

Note:
you shouldn't call this method on unorganized point clouds!
Parameters:
row_startthe offset on rows
col_startthe offset on columns
nb_rowsthe number of rows to be considered row_start included
nb_colsthe number of columns to be considered col_start included

Definition at line 151 of file pcl_base.h.

template<typename PointT>
virtual void pcl::PCLBase< PointT >::setInputCloud ( const PointCloudConstPtr cloud) [inline, virtual, inherited]

Provide a pointer to the input dataset.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Reimplemented in pcl::PCA< PointT >.

Definition at line 103 of file pcl_base.h.

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 628 of file conditional_removal.h.

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 645 of file conditional_removal.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines