43 #include <pcl/pcl_macros.h>
44 #include <pcl/filters/filter_indices.h>
80 template <
typename Po
intT>
87 using FieldList =
typename pcl::traits::fieldList<PointT>::type;
91 using Ptr = shared_ptr<PassThrough<PointT> >;
92 using ConstPtr = shared_ptr<const PassThrough<PointT> >;
101 filter_limit_min_ (std::numeric_limits<float>::lowest()),
102 filter_limit_max_ (std::numeric_limits<float>::max())
114 filter_field_name_ = field_name;
120 inline std::string
const
123 return (filter_field_name_);
134 filter_limit_min_ = limit_min;
135 filter_limit_max_ = limit_max;
145 limit_min = filter_limit_min_;
146 limit_max = filter_limit_max_;
187 std::string filter_field_name_;
190 float filter_limit_min_;
193 float filter_limit_max_;
216 filter_limit_min_(std::numeric_limits<float>::lowest())
217 , filter_limit_max_(std::numeric_limits<float>::max())
219 filter_name_ =
"PassThrough";
229 filter_field_name_ = field_name;
233 inline std::string
const
236 return (filter_field_name_);
246 filter_limit_min_ = limit_min;
247 filter_limit_max_ = limit_max;
258 limit_min = filter_limit_min_;
259 limit_max = filter_limit_max_;
264 applyFilter (PCLPointCloud2 &output)
override;
267 applyFilter (
Indices &indices)
override;
271 std::string filter_field_name_;
274 double filter_limit_min_;
277 double filter_limit_max_;
282 #ifdef PCL_NO_PRECOMPILE
283 #include <pcl/filters/impl/passthrough.hpp>
shared_ptr< ::pcl::PCLPointCloud2 > Ptr
PassThrough(bool extract_removed_indices=false)
Constructor.
shared_ptr< PointCloud< PointT > > Ptr
void setFilterLimits(const double &limit_min, const double &limit_max)
Set the field filter limits.
std::string const getFilterFieldName() const
Retrieve the name of the field to be used for filtering data.
typename pcl::traits::fieldList< PointInT >::type FieldList
void applyFilter(Indices &indices) override
Filtered results are indexed by an indices array.
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
void setFilterFieldName(const std::string &field_name)
Provide the name of the field to be used for filtering data.
void setFilterFieldName(const std::string &field_name)
Provide the name of the field to be used for filtering data.
bool negative_
False = normal filter behavior (default), true = inverted behavior.
PassThrough(bool extract_removed_indices=false)
Constructor.
FilterIndices represents the base class for filters that are about binary point removal.
Filter represents the base filter class.
void setFilterLimits(const float &limit_min, const float &limit_max)
Set the numerical limits for the field for filtering data.
shared_ptr< Filter< PointInT > > Ptr
typename PointCloud::Ptr PointCloudPtr
bool getFilterLimitsNegative() const
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false)...
IndicesAllocator<> Indices
Type used for indices in PCL.
PassThrough passes points in a cloud based on constraints for one particular field of the point type...
void getFilterLimits(double &limit_min, double &limit_max) const
Get the field filter limits (min/max) set by the user.
std::string const getFilterFieldName() const
Get the name of the field used for filtering.
void applyFilterIndices(Indices &indices)
Filtered results are indexed by an indices array.
void getFilterLimits(float &limit_min, float &limit_max) const
Get the numerical limits for the field for filtering data.
PCLPointCloud2::ConstPtr PCLPointCloud2ConstPtr
shared_ptr< const PointCloud< PointT > > ConstPtr
std::string filter_name_
The filter name.
shared_ptr< const Filter< PointInT > > ConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.
PCLPointCloud2::Ptr PCLPointCloud2Ptr
typename PointCloud::ConstPtr PointCloudConstPtr