12#include <pcl/filters/filter_indices.h>
13#include <pcl/type_traits.h>
22template <
typename Po
intT,
typename Function>
34template <
typename Po
intT,
typename FunctionObject>
43 "Function object signature must be similar to `bool(const "
44 "PointCloud<PointT>&, index_t)`");
66 : Base(extract_removed_indices), functionObject_(std::move(function_object))
74 return functionObject_;
80 return functionObject_;
100 indices.push_back(index);
116 FunctorFilter(
bool extract_removed_indices =
false) : Base(extract_removed_indices)
129 functionObject_ = std::move(function_object);
134template <
class Po
intT>
137template <
class Po
intT>
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.
FilterIndices(bool extract_removed_indices=false)
Constructor.
bool negative_
False = normal filter behavior (default), true = inverted behavior.
PointCloudConstPtr input_
The input point cloud dataset.
IndicesPtr indices_
A pointer to the vector of point indices to use.
PCLBase()
Empty constructor.
PointCloud represents the base class in PCL for storing collections of 3D points.
Filter point clouds and indices based on a function object passed in the ctor.
void applyFilter(Indices &indices) override
Filtered results are indexed by an indices array.
PointCloudConstPtr input_
FunctorFilter(FunctionObjectT function_object, bool extract_removed_indices=false)
Constructor.
FunctionObjectT & getFunctionObject() noexcept
FunctorFilter(bool extract_removed_indices=false)
ctor to be used by derived classes with member function as FilterFunction
const FunctionObjectT & getFunctionObject() const noexcept
void setFunctionObject(FunctionObjectT function_object) const noexcept
utility function for derived class
FunctionObject FunctionObjectT
advanced::FunctorFilter< PointT, FilterFunction< PointT > > FunctionFilter
std::function< bool(const PointCloud< PointT > &, index_t)> FilterFunction
static constexpr bool is_function_object_for_filter_v
Checks if the function object meets the usage in FunctorFilter class.
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
IndicesAllocator<> Indices
Type used for indices in PCL.
constexpr bool is_invocable_r_v