Point Cloud Library (PCL) 1.15.0
Loading...
Searching...
No Matches
pcl::Filter< pcl::PCLPointCloud2 > Class Referenceabstract

Filter represents the base filter class. More...

#include <pcl/filters/filter.h>

+ Inheritance diagram for pcl::Filter< pcl::PCLPointCloud2 >:
+ Collaboration diagram for pcl::Filter< pcl::PCLPointCloud2 >:

Public Types

using Ptr = shared_ptr<Filter<pcl::PCLPointCloud2> >
 
using ConstPtr = shared_ptr<const Filter<pcl::PCLPointCloud2> >
 
using PCLPointCloud2 = pcl::PCLPointCloud2
 
using PCLPointCloud2Ptr = PCLPointCloud2::Ptr
 
using PCLPointCloud2ConstPtr = PCLPointCloud2::ConstPtr
 
using Ptr
 
using ConstPtr
 
using PointCloud
 
using PointCloudPtr
 
using PointCloudConstPtr
 
- Public Types inherited from pcl::PCLBase< pcl::PCLPointCloud2 >
using PCLPointCloud2 = pcl::PCLPointCloud2
 
using PCLPointCloud2Ptr = PCLPointCloud2::Ptr
 
using PCLPointCloud2ConstPtr = PCLPointCloud2::ConstPtr
 
using PointIndicesPtr = PointIndices::Ptr
 
using PointIndicesConstPtr = PointIndices::ConstPtr
 
using PointCloud
 
using PointCloudPtr
 
using PointCloudConstPtr
 
using PointIndicesPtr
 
using PointIndicesConstPtr
 

Public Member Functions

 Filter (bool extract_removed_indices=false)
 Empty constructor.
 
IndicesConstPtr const getRemovedIndices () const
 Get the point indices being removed.
 
void getRemovedIndices (PointIndices &pi)
 Get the point indices being removed.
 
void filter (PCLPointCloud2 &output)
 Calls the filtering method and returns the filtered dataset in output.
 
 Filter (bool extract_removed_indices=false)
 Empty constructor.
 
IndicesConstPtr const getRemovedIndices () const
 Get the point indices being removed.
 
void getRemovedIndices (PointIndices &pi)
 Get the point indices being removed.
 
void filter (PointCloud &output)
 Calls the filtering method and returns the filtered dataset in output.
 
- Public Member Functions inherited from pcl::PCLBase< pcl::PCLPointCloud2 >
 PCLBase ()
 Empty constructor.
 
virtual ~PCLBase ()=default
 destructor.
 
void setInputCloud (const PCLPointCloud2ConstPtr &cloud)
 Provide a pointer to the input dataset.
 
PCLPointCloud2ConstPtr const getInputCloud () const
 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 PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
 
IndicesPtr const getIndices () const
 Get a pointer to the vector of indices used.
 
 PCLBase ()
 Empty constructor.
 
 PCLBase (const PCLBase &base)
 Copy constructor.
 
virtual ~PCLBase ()=default
 Destructor.
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
 
PointCloudConstPtr const getInputCloud () const
 Get a pointer to the input point cloud dataset.
 
virtual void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
 
virtual void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
 
virtual void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
 
virtual void setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud.
 
IndicesPtr getIndices ()
 Get a pointer to the vector of indices used.
 
IndicesConstPtr const getIndices () const
 Get a pointer to the vector of indices used.
 
const pcl::PCLPointCloud2operator[] (std::size_t pos) const
 Override PointCloud operator[] to shorten code.
 

Protected Member Functions

virtual void applyFilter (PCLPointCloud2 &output)=0
 Abstract filter method.
 
const std::string & getClassName () const
 Get a string representation of the name of this class.
 
virtual void applyFilter (PointCloud &output)=0
 Abstract filter method.
 
const std::string & getClassName () const
 Get a string representation of the name of this class.
 
- Protected Member Functions inherited from pcl::PCLBase< pcl::PCLPointCloud2 >
bool initCompute ()
 
bool deinitCompute ()
 
bool initCompute ()
 This method should get called before starting the actual computation.
 
bool deinitCompute ()
 This method should get called after finishing the actual computation.
 

Protected Attributes

IndicesPtr removed_indices_
 Indices of the points that are removed.
 
bool extract_removed_indices_
 Set to true if we want to return the indices of the removed points.
 
std::string filter_name_
 The filter name.
 
IndicesPtr removed_indices_
 Indices of the points that are removed.
 
std::string filter_name_
 The filter name.
 
bool extract_removed_indices_
 Set to true if we want to return the indices of the removed points.
 
- Protected Attributes inherited from pcl::PCLBase< pcl::PCLPointCloud2 >
PCLPointCloud2ConstPtr input_
 The input point cloud dataset.
 
IndicesPtr indices_
 A pointer to the vector of point indices to use.
 
bool use_indices_
 Set to true if point indices are used.
 
bool fake_indices_
 If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud.
 
std::vector< uindex_tfield_sizes_
 The size of each individual field.
 
index_t x_idx_
 The x-y-z fields indices.
 
index_t y_idx_
 
index_t z_idx_
 
std::string x_field_name_
 The desired x-y-z field names.
 
std::string y_field_name_
 
std::string z_field_name_
 
PointCloudConstPtr input_
 The input point cloud dataset.
 
IndicesPtr indices_
 A pointer to the vector of point indices to use.
 
bool use_indices_
 Set to true if point indices are used.
 
bool fake_indices_
 If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud.
 

Detailed Description

Filter represents the base filter class.

All filters must inherit from this interface.

Author
Radu B. Rusu

Definition at line 186 of file filter.h.

Member Typedef Documentation

◆ ConstPtr [1/2]

using pcl::Filter< pcl::PCLPointCloud2 >::ConstPtr

Definition at line 84 of file filter.h.

◆ ConstPtr [2/2]

using pcl::Filter< pcl::PCLPointCloud2 >::ConstPtr = shared_ptr<const Filter<pcl::PCLPointCloud2> >

Definition at line 190 of file filter.h.

◆ PCLPointCloud2

Definition at line 192 of file filter.h.

◆ PCLPointCloud2ConstPtr

using pcl::Filter< pcl::PCLPointCloud2 >::PCLPointCloud2ConstPtr = PCLPointCloud2::ConstPtr

Definition at line 194 of file filter.h.

◆ PCLPointCloud2Ptr

using pcl::Filter< pcl::PCLPointCloud2 >::PCLPointCloud2Ptr = PCLPointCloud2::Ptr

Definition at line 193 of file filter.h.

◆ PointCloud

Definition at line 87 of file filter.h.

◆ PointCloudConstPtr

using pcl::Filter< pcl::PCLPointCloud2 >::PointCloudConstPtr

Definition at line 89 of file filter.h.

◆ PointCloudPtr

using pcl::Filter< pcl::PCLPointCloud2 >::PointCloudPtr

Definition at line 88 of file filter.h.

◆ Ptr [1/2]

Definition at line 83 of file filter.h.

◆ Ptr [2/2]

Definition at line 189 of file filter.h.

Constructor & Destructor Documentation

◆ Filter() [1/2]

pcl::Filter< pcl::PCLPointCloud2 >::Filter ( bool extract_removed_indices = false)
inline

Empty constructor.

Parameters
[in]extract_removed_indicesset to true if the filtered data indices should be saved in a separate list. Default: false.

Definition at line 200 of file filter.h.

References extract_removed_indices_, and removed_indices_.

Referenced by pcl::FilterIndices< pcl::PCLPointCloud2 >::FilterIndices().

◆ Filter() [2/2]

pcl::Filter< pcl::PCLPointCloud2 >::Filter ( bool extract_removed_indices = false)
inline

Empty constructor.

Parameters
[in]extract_removed_indicesset to true if the filtered data indices should be saved in a separate list. Default: false.

Definition at line 95 of file filter.h.

Member Function Documentation

◆ applyFilter() [1/2]

◆ applyFilter() [2/2]

virtual void pcl::Filter< pcl::PCLPointCloud2 >::applyFilter ( PointCloud & output)
protectedpure virtual

Abstract filter method.

The implementation needs to set output.{points, width, height, is_dense}.

Parameters
[out]outputthe resultant filtered point cloud

◆ filter() [1/2]

void pcl::Filter< pcl::PCLPointCloud2 >::filter ( PCLPointCloud2 & output)

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

Parameters
[out]outputthe resultant filtered point cloud dataset

◆ filter() [2/2]

void pcl::Filter< pcl::PCLPointCloud2 >::filter ( PointCloud & output)
inline

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

Parameters
[out]outputthe resultant filtered point cloud dataset

Definition at line 121 of file filter.h.

◆ getClassName() [1/2]

const std::string & pcl::Filter< pcl::PCLPointCloud2 >::getClassName ( ) const
inlineprotected

Get a string representation of the name of this class.

Definition at line 174 of file filter.h.

◆ getClassName() [2/2]

const std::string & pcl::Filter< pcl::PCLPointCloud2 >::getClassName ( ) const
inlineprotected

Get a string representation of the name of this class.

Definition at line 250 of file filter.h.

References filter_name_.

Referenced by pcl::ExtractIndices< pcl::PCLPointCloud2 >::applyFilter().

◆ getRemovedIndices() [1/4]

IndicesConstPtr const pcl::Filter< pcl::PCLPointCloud2 >::getRemovedIndices ( ) const
inline

Get the point indices being removed.

Definition at line 103 of file filter.h.

◆ getRemovedIndices() [2/4]

IndicesConstPtr const pcl::Filter< pcl::PCLPointCloud2 >::getRemovedIndices ( ) const
inline

Get the point indices being removed.

Definition at line 208 of file filter.h.

References removed_indices_.

◆ getRemovedIndices() [3/4]

void pcl::Filter< pcl::PCLPointCloud2 >::getRemovedIndices ( PointIndices & pi)
inline

Get the point indices being removed.

Parameters
[out]pithe resultant point indices that have been removed

Definition at line 112 of file filter.h.

◆ getRemovedIndices() [4/4]

void pcl::Filter< pcl::PCLPointCloud2 >::getRemovedIndices ( PointIndices & pi)
inline

Get the point indices being removed.

Parameters
[out]pithe resultant point indices that have been removed

Definition at line 217 of file filter.h.

References pcl::PointIndices::indices, and removed_indices_.

Member Data Documentation

◆ extract_removed_indices_ [1/2]

bool pcl::Filter< pcl::PCLPointCloud2 >::extract_removed_indices_
protected

Set to true if we want to return the indices of the removed points.

Definition at line 161 of file filter.h.

◆ extract_removed_indices_ [2/2]

bool pcl::Filter< pcl::PCLPointCloud2 >::extract_removed_indices_
protected

Set to true if we want to return the indices of the removed points.

Definition at line 234 of file filter.h.

Referenced by pcl::ExtractIndices< pcl::PCLPointCloud2 >::applyFilter(), and Filter().

◆ filter_name_ [1/2]

std::string pcl::Filter< pcl::PCLPointCloud2 >::filter_name_
protected

The filter name.

Definition at line 158 of file filter.h.

◆ filter_name_ [2/2]

◆ removed_indices_ [1/2]

IndicesPtr pcl::Filter< pcl::PCLPointCloud2 >::removed_indices_
protected

Indices of the points that are removed.

Definition at line 155 of file filter.h.

◆ removed_indices_ [2/2]


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