42 #include <pcl/pcl_base.h>
43 #include <pcl/common/io.h>
44 #include <pcl/PointIndices.h>
56 template<
typename Po
intT>
void
69 template<
typename Po
intT>
void
79 template<
typename Po
intT>
83 using Ptr = shared_ptr<Filter<PointT> >;
84 using ConstPtr = shared_ptr<const Filter<PointT> >;
95 Filter (
bool extract_removed_indices =
false) :
126 if (
input_.get () == &output)
173 inline const std::string&
176 return (filter_name_);
189 using Ptr = shared_ptr<Filter<pcl::PCLPointCloud2> >;
190 using ConstPtr = shared_ptr<const Filter<pcl::PCLPointCloud2> >;
200 Filter (
bool extract_removed_indices =
false) :
201 removed_indices_ (new
Indices),
202 extract_removed_indices_ (extract_removed_indices)
210 return (removed_indices_);
219 pi.
indices = *removed_indices_;
249 inline const std::string&
252 return (filter_name_);
257 #ifdef PCL_NO_PRECOMPILE
258 #include <pcl/filters/impl/filter.hpp>
shared_ptr< ::pcl::PCLPointCloud2 > Ptr
void getRemovedIndices(PointIndices &pi)
Get the point indices being removed.
shared_ptr< PointCloud< PointT > > Ptr
std::string filter_name_
The filter name.
void removeNaNFromPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, Indices &index)
Removes points with x, y, or z equal to NaN.
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
shared_ptr< Indices > IndicesPtr
shared_ptr< Filter< pcl::PCLPointCloud2 > > Ptr
void filter(PointCloud &output)
Calls the filtering method and returns the filtered dataset in output.
shared_ptr< const Indices > IndicesConstPtr
Filter(bool extract_removed_indices=false)
Empty constructor.
bool initCompute()
This method should get called before starting the actual computation.
Eigen::Vector4f sensor_origin_
Sensor acquisition pose (origin/translation).
Filter(bool extract_removed_indices=false)
Empty constructor.
Filter represents the base filter class.
void getRemovedIndices(PointIndices &pi)
Get the point indices being removed.
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.
shared_ptr< Filter< pcl::PointXYZRGBL > > Ptr
IndicesConstPtr const getRemovedIndices() const
Get the point indices being removed.
IndicesPtr removed_indices_
Indices of the points that are removed.
typename PointCloud::Ptr PointCloudPtr
Eigen::Quaternionf sensor_orientation_
Sensor acquisition pose (rotation).
IndicesAllocator<> Indices
Type used for indices in PCL.
bool deinitCompute()
This method should get called after finishing the actual computation.
void removeNaNNormalsFromPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, Indices &index)
Removes points that have their normals invalid (i.e., equal to NaN)
PointCloud represents the base class in PCL for storing collections of 3D points. ...
pcl::PCLHeader header
The point cloud header.
PCLPointCloud2::ConstPtr PCLPointCloud2ConstPtr
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.
shared_ptr< const PointCloud< PointT > > ConstPtr
virtual void applyFilter(PointCloud &output)=0
Abstract filter method.
IndicesConstPtr const getRemovedIndices() const
Get the point indices being removed.
PointCloudConstPtr input_
The input point cloud dataset.
std::string filter_name_
The filter name.
shared_ptr< const Filter< pcl::PCLPointCloud2 > > ConstPtr
shared_ptr< const Filter< pcl::PointXYZRGBL > > ConstPtr
const std::string & getClassName() const
Get a string representation of the name of this class.
PCLPointCloud2::Ptr PCLPointCloud2Ptr
const std::string & getClassName() const
Get a string representation of the name of this class.
typename PointCloud::ConstPtr PointCloudConstPtr
IndicesPtr removed_indices_
Indices of the points that are removed.