43 #include <pcl/pcl_base.h> 44 #include <pcl/common/io.h> 45 #include <pcl/conversions.h> 46 #include <pcl/filters/boost.h> 48 #include <pcl/PointIndices.h> 60 template<
typename Po
intT>
void 63 std::vector<int> &index);
73 template<
typename Po
intT>
void 76 std::vector<int> &index);
83 template<
typename Po
intT>
90 typedef boost::shared_ptr< Filter<PointT> >
Ptr;
91 typedef boost::shared_ptr< const Filter<PointT> >
ConstPtr;
102 Filter (
bool extract_removed_indices =
false) :
137 if (
input_.get () == &output)
181 inline const std::string&
197 typedef boost::shared_ptr< Filter<pcl::PCLPointCloud2> >
Ptr;
198 typedef boost::shared_ptr< const Filter<pcl::PCLPointCloud2> >
ConstPtr;
208 Filter (
bool extract_removed_indices =
false) :
209 removed_indices_ (new
std::vector<int>),
210 extract_removed_indices_ (extract_removed_indices),
222 return (removed_indices_);
231 pi.
indices = *removed_indices_;
261 inline const std::string&
264 return (filter_name_);
269 #ifdef PCL_NO_PRECOMPILE 270 #include <pcl/filters/impl/filter.hpp> 273 #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
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
PCL_EXPORTS void copyPointCloud(const pcl::PCLPointCloud2 &cloud_in, const std::vector< int > &indices, pcl::PCLPointCloud2 &cloud_out)
Extract the indices of a given point cloud as a new point cloud.
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< PointCloud< pcl::PointXYZRGBL > > Ptr
Eigen::Vector4f sensor_origin_
Sensor acquisition pose (origin/translation).
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.
IndicesPtr removed_indices_
Indices of the points that are removed.
Eigen::Quaternionf sensor_orientation_
Sensor acquisition pose (rotation).
boost::shared_ptr< const PointCloud< pcl::PointXYZRGBL > > ConstPtr
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. ...
pcl::PCLHeader header
The point cloud header.
boost::shared_ptr< Filter< pcl::PCLPointCloud2 > > Ptr
boost::shared_ptr< const std::vector< int > > IndicesConstPtr
const std::string & getClassName() const
Get a string representation of the name of this class.
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.
const std::string & getClassName() const
Get a string representation of the name of this class.
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.
boost::shared_ptr< const Filter< PointT > > ConstPtr
IndicesPtr removed_indices_
Indices of the points that are removed.