43 #include <pcl/pcl_base.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>
89 typedef boost::shared_ptr< Filter<PointT> >
Ptr;
90 typedef boost::shared_ptr< const Filter<PointT> >
ConstPtr;
101 Filter (
bool extract_removed_indices =
false) :
175 inline const std::string&
178 return (filter_name_);
191 typedef boost::shared_ptr< Filter<pcl::PCLPointCloud2> >
Ptr;
192 typedef boost::shared_ptr< const Filter<pcl::PCLPointCloud2> >
ConstPtr;
202 Filter (
bool extract_removed_indices =
false) :
203 removed_indices_ (new
std::vector<int>),
204 extract_removed_indices_ (extract_removed_indices),
216 return (removed_indices_);
225 pi.
indices = *removed_indices_;
232 filter (PCLPointCloud2 &output);
252 applyFilter (PCLPointCloud2 &output) = 0;
255 inline const std::string&
258 return (filter_name_);
263 #ifdef PCL_NO_PRECOMPILE
264 #include <pcl/filters/impl/filter.hpp>
267 #endif //#ifndef PCL_FILTER_H_
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 getRemovedIndices(PointIndices &pi)
Get the point indices being removed.
PCLPointCloud2::ConstPtr PCLPointCloud2ConstPtr
boost::shared_ptr< PointCloud< PointT > > Ptr
std::string filter_name_
The filter name.
boost::shared_ptr< std::vector< int > > IndicesPtr
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.
pcl::PointCloud< PointT > PointCloud
virtual ~Filter()
Empty destructor.
pcl::PCLPointCloud2 PCLPointCloud2
boost::shared_ptr< const Filter< pcl::PCLPointCloud2 > > ConstPtr
std::vector< int > indices
void filter(PointCloud &output)
Calls the filtering method and returns the filtered dataset in output.
Filter(bool extract_removed_indices=false)
Empty constructor.
boost::shared_ptr< Filter< PointT > > Ptr
boost::shared_ptr< ::pcl::PCLPointCloud2 > Ptr
bool initCompute()
This method should get called before starting the actual computation.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
Filter(bool extract_removed_indices=false)
Empty constructor.
Filter represents the base filter class.
IndicesConstPtr const getRemovedIndices()
Get the point indices being removed.
void getRemovedIndices(PointIndices &pi)
Get the point indices being removed.
IndicesConstPtr const getRemovedIndices()
Get the point indices being removed.
Eigen::Quaternionf sensor_orientation_
Sensor acquisition pose (rotation).
IndicesPtr removed_indices_
Indices of the points that are removed.
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
bool deinitCompute()
This method should get called after finishing the actual computation.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
boost::shared_ptr< Filter< pcl::PCLPointCloud2 > > Ptr
Eigen::Vector4f sensor_origin_
Sensor acquisition pose (origin/translation).
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
bool extract_removed_indices_
Set to true if we want to return the indices of the removed points.
bool extract_removed_indices_
Set to true if we want to return the indices of the removed points.
PCLPointCloud2::Ptr PCLPointCloud2Ptr
PointCloud::Ptr PointCloudPtr
virtual void applyFilter(PointCloud &output)=0
Abstract filter method.
virtual ~Filter()
Empty destructor.
PointCloudConstPtr input_
The input point cloud dataset.
std::string filter_name_
The filter name.
const std::string & getClassName() const
Get a string representation of the name of this class.
boost::shared_ptr< const Filter< PointT > > ConstPtr
const std::string & getClassName() const
Get a string representation of the name of this class.
pcl::PCLHeader header
The point cloud header.
IndicesPtr removed_indices_
Indices of the points that are removed.