Point Cloud Library (PCL)
1.11.0
|
42 #include <pcl/pcl_base.h>
43 #include <pcl/common/io.h>
44 #include <pcl/conversions.h>
45 #include <pcl/filters/boost.h>
47 #include <pcl/PointIndices.h>
59 template<
typename Po
intT>
void
62 std::vector<int> &index);
72 template<
typename Po
intT>
void
75 std::vector<int> &index);
82 template<
typename Po
intT>
86 using Ptr = shared_ptr<Filter<PointT> >;
87 using ConstPtr = shared_ptr<const Filter<PointT> >;
98 Filter (
bool extract_removed_indices =
false) :
129 if (
input_.get () == &output)
176 inline const std::string&
192 using Ptr = shared_ptr<Filter<pcl::PCLPointCloud2> >;
193 using ConstPtr = shared_ptr<const Filter<pcl::PCLPointCloud2> >;
203 Filter (
bool extract_removed_indices =
false) :
204 removed_indices_ (new std::vector<int>),
205 extract_removed_indices_ (extract_removed_indices)
213 return (removed_indices_);
222 pi.
indices = *removed_indices_;
252 inline const std::string&
255 return (filter_name_);
260 #ifdef PCL_NO_PRECOMPILE
261 #include <pcl/filters/impl/filter.hpp>
IndicesPtr removed_indices_
Indices of the points that are removed.
shared_ptr< Indices > IndicesPtr
shared_ptr< Filter< pcl::PointXYZRGBL > > Ptr
typename PointCloud::ConstPtr PointCloudConstPtr
PointCloudConstPtr input_
The input point cloud dataset.
typename PointCloud::Ptr PointCloudPtr
shared_ptr< ::pcl::PCLPointCloud2 > Ptr
virtual void applyFilter(PointCloud &output)=0
Abstract filter method.
shared_ptr< const Filter< pcl::PCLPointCloud2 > > ConstPtr
shared_ptr< const Indices > IndicesConstPtr
Filter(bool extract_removed_indices=false)
Empty constructor.
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.
PCLPointCloud2::ConstPtr PCLPointCloud2ConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points.
void copyPointCloud(const pcl::PointCloud< PointInT > &cloud_in, pcl::PointCloud< PointOutT > &cloud_out)
Copy all the fields from a given point cloud into a new point cloud.
IndicesConstPtr const getRemovedIndices() const
Get the point indices being removed.
virtual void applyFilter(PCLPointCloud2 &output)=0
Abstract filter method.
void getRemovedIndices(PointIndices &pi)
Get the point indices being removed.
PCLPointCloud2::Ptr PCLPointCloud2Ptr
Filter(bool extract_removed_indices=false)
Empty constructor.
shared_ptr< Filter< pcl::PCLPointCloud2 > > Ptr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
void removeNaNNormalsFromPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, std::vector< int > &index)
Removes points that have their normals invalid (i.e., equal to NaN)
void filter(PCLPointCloud2 &output)
Calls the filtering method and returns the filtered dataset in output.
shared_ptr< const Filter< pcl::PointXYZRGBL > > ConstPtr
IndicesPtr removed_indices_
Indices of the points that are removed.
Eigen::Vector4f sensor_origin_
Sensor acquisition pose (origin/translation).
std::string filter_name_
The filter name.
Eigen::Quaternionf sensor_orientation_
Sensor acquisition pose (rotation).
void removeNaNFromPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, std::vector< int > &index)
Removes points with x, y, or z equal to NaN.
Filter represents the base filter class.
pcl::PCLHeader header
The point cloud header.
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.
shared_ptr< PointCloud< PointT > > Ptr
bool deinitCompute()
This method should get called after finishing the actual computation.
const std::string & getClassName() const
Get a string representation of the name of this class.
shared_ptr< const PointCloud< PointT > > ConstPtr
const std::string & getClassName() const
Get a string representation of the name of this class.
bool initCompute()
This method should get called before starting the actual computation.
IndicesConstPtr const getRemovedIndices() const
Get the point indices being removed.
bool extract_removed_indices_
Set to true if we want to return the indices of the removed points.