Point Cloud Library (PCL)
1.14.1-dev
|
Filter point clouds and indices based on a function object passed in the ctor. More...
#include <pcl/filters/experimental/functor_filter.h>
Public Types | |
using | FunctionObjectT = FunctionObject |
![]() | |
using | PointCloud = pcl::PointCloud< PointT > |
using | Ptr = shared_ptr< FilterIndices< PointT > > |
using | ConstPtr = shared_ptr< const FilterIndices< PointT > > |
![]() | |
using | Ptr = shared_ptr< Filter< PointT > > |
using | ConstPtr = shared_ptr< const Filter< PointT > > |
using | PointCloud = pcl::PointCloud< PointT > |
using | PointCloudPtr = typename PointCloud::Ptr |
using | PointCloudConstPtr = typename PointCloud::ConstPtr |
![]() | |
using | PointCloud = pcl::PointCloud< PointT > |
using | PointCloudPtr = typename PointCloud::Ptr |
using | PointCloudConstPtr = typename PointCloud::ConstPtr |
using | PointIndicesPtr = PointIndices::Ptr |
using | PointIndicesConstPtr = PointIndices::ConstPtr |
Public Member Functions | |
FunctorFilter (FunctionObjectT function_object, bool extract_removed_indices=false) | |
Constructor. More... | |
const FunctionObjectT & | getFunctionObject () const noexcept |
FunctionObjectT & | getFunctionObject () noexcept |
void | applyFilter (Indices &indices) override |
Filtered results are indexed by an indices array. More... | |
![]() | |
FilterIndices (bool extract_removed_indices=false) | |
Constructor. More... | |
void | filter (Indices &indices) |
Calls the filtering method and returns the filtered point cloud indices. More... | |
void | setNegative (bool negative) |
Set whether the regular conditions for points filtering should apply, or the inverted conditions. More... | |
bool | getNegative () const |
Get whether the regular conditions for points filtering should apply, or the inverted conditions. More... | |
void | setKeepOrganized (bool keep_organized) |
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. More... | |
bool | getKeepOrganized () const |
Get 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. More... | |
void | setUserFilterValue (float value) |
Provide a value that the filtered points should be set to instead of removing them. More... | |
![]() | |
Filter (bool extract_removed_indices=false) | |
Empty constructor. More... | |
IndicesConstPtr const | getRemovedIndices () const |
Get the point indices being removed. More... | |
void | getRemovedIndices (PointIndices &pi) |
Get the point indices being removed. More... | |
void | filter (PointCloud &output) |
Calls the filtering method and returns the filtered dataset in output. More... | |
![]() | |
PCLBase () | |
Empty constructor. More... | |
PCLBase (const PCLBase &base) | |
Copy constructor. More... | |
virtual | ~PCLBase ()=default |
Destructor. More... | |
virtual void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. More... | |
PointCloudConstPtr const | getInputCloud () const |
Get a pointer to the input point cloud dataset. More... | |
virtual void | setIndices (const IndicesPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... | |
virtual void | setIndices (const IndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... | |
virtual void | setIndices (const PointIndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... | |
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. More... | |
IndicesPtr | getIndices () |
Get a pointer to the vector of indices used. More... | |
IndicesConstPtr const | getIndices () const |
Get a pointer to the vector of indices used. More... | |
const PointT & | operator[] (std::size_t pos) const |
Override PointCloud operator[] to shorten code. More... | |
Protected Member Functions | |
FunctorFilter (bool extract_removed_indices=false) | |
ctor to be used by derived classes with member function as FilterFunction More... | |
void | setFunctionObject (FunctionObjectT function_object) const noexcept |
utility function for derived class More... | |
![]() | |
void | applyFilter (PointCloud &output) override |
Abstract filter method for point cloud. More... | |
![]() | |
const std::string & | getClassName () const |
Get a string representation of the name of this class. More... | |
![]() | |
bool | initCompute () |
This method should get called before starting the actual computation. More... | |
bool | deinitCompute () |
This method should get called after finishing the actual computation. More... | |
Protected Attributes | |
bool | negative_ |
False = normal filter behavior (default), true = inverted behavior. More... | |
IndicesPtr | indices_ |
A pointer to the vector of point indices to use. More... | |
PointCloudConstPtr | input_ |
The input point cloud dataset. More... | |
![]() | |
bool | negative_ {false} |
False = normal filter behavior (default), true = inverted behavior. More... | |
bool | keep_organized_ {false} |
False = remove points (default), true = redefine points, keep structure. More... | |
float | user_filter_value_ |
The user given value that the filtered point dimensions should be set to (default = NaN). More... | |
![]() | |
IndicesPtr | removed_indices_ |
Indices of the points that are removed. More... | |
std::string | filter_name_ |
The filter name. More... | |
bool | extract_removed_indices_ |
Set to true if we want to return the indices of the removed points. More... | |
![]() | |
PointCloudConstPtr | input_ |
The input point cloud dataset. More... | |
IndicesPtr | indices_ |
A pointer to the vector of point indices to use. More... | |
bool | use_indices_ |
Set to true if point indices are used. More... | |
bool | fake_indices_ |
If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More... | |
Filter point clouds and indices based on a function object passed in the ctor.
The function object can be anything (lambda, std::function, invocable class, etc.) that can be moved into the class. Additionally, it must satisfy the condition is_function_object_for_filter_v
Definition at line 35 of file functor_filter.h.
using pcl::experimental::advanced::FunctorFilter< PointT, FunctionObject >::FunctionObjectT = FunctionObject |
Definition at line 40 of file functor_filter.h.
|
inline |
Constructor.
[in] | function_object | Object of effective type FilterFunction in order to filter out the indices for which it returns false |
[in] | extract_removed_indices | Set to true if you want to be able to extract the indices of points being removed (default = false). |
Definition at line 65 of file functor_filter.h.
References pcl::Filter< PointT >::filter_name_.
|
inlineprotected |
ctor to be used by derived classes with member function as FilterFunction
[in] | extract_removed_indices | Set to true if you want to be able to extract the indices of points being removed (default = false). |
setFunctionObject
has been called Do not call any filter routine until then Definition at line 116 of file functor_filter.h.
References pcl::Filter< PointT >::filter_name_.
|
inlineoverridevirtual |
Filtered results are indexed by an indices array.
[out] | indices | The resultant indices. |
Implements pcl::FilterIndices< PointT >.
Definition at line 88 of file functor_filter.h.
References pcl::Filter< PointT >::extract_removed_indices_, pcl::experimental::advanced::FunctorFilter< PointT, FunctionObject >::indices_, pcl::experimental::advanced::FunctorFilter< PointT, FunctionObject >::input_, pcl::experimental::advanced::FunctorFilter< PointT, FunctionObject >::negative_, and pcl::Filter< PointT >::removed_indices_.
|
inlinenoexcept |
Definition at line 72 of file functor_filter.h.
|
inlinenoexcept |
Definition at line 78 of file functor_filter.h.
|
inlineprotectednoexcept |
utility function for derived class
[in] | function_object | Object of effective type FilterFunction in order to filter out the indices for which it returns false |
Definition at line 127 of file functor_filter.h.
|
protected |
A pointer to the vector of point indices to use.
Definition at line 150 of file pcl_base.h.
Referenced by pcl::experimental::advanced::FunctorFilter< PointT, FunctionObject >::applyFilter().
|
protected |
The input point cloud dataset.
Definition at line 147 of file pcl_base.h.
Referenced by pcl::experimental::advanced::FunctorFilter< PointT, FunctionObject >::applyFilter().
|
protected |
False = normal filter behavior (default), true = inverted behavior.
Definition at line 167 of file filter_indices.h.
Referenced by pcl::experimental::advanced::FunctorFilter< PointT, FunctionObject >::applyFilter().