Point Cloud Library (PCL)
1.11.1
|
43 #include <pcl/filters/filter_indices.h>
79 template <
typename Po
intT>
86 using FieldList =
typename pcl::traits::fieldList<PointT>::type;
90 using Ptr = shared_ptr<PassThrough<PointT> >;
91 using ConstPtr = shared_ptr<const PassThrough<PointT> >;
99 filter_field_name_ (
""),
100 filter_limit_min_ (FLT_MIN),
101 filter_limit_max_ (FLT_MAX)
113 filter_field_name_ = field_name;
119 inline std::string
const
122 return (filter_field_name_);
133 filter_limit_min_ = limit_min;
134 filter_limit_max_ = limit_max;
144 limit_min = filter_limit_min_;
145 limit_max = filter_limit_max_;
153 PCL_DEPRECATED(1, 13,
"use inherited FilterIndices::setNegative() instead")
164 PCL_DEPRECATED(1, 13,
"use inherited FilterIndices::getNegative() instead")
209 std::string filter_field_name_;
212 float filter_limit_min_;
215 float filter_limit_max_;
238 filter_field_name_ (
""), filter_limit_min_ (-FLT_MAX), filter_limit_max_ (FLT_MAX)
240 filter_name_ =
"PassThrough";
250 filter_field_name_ = field_name;
254 inline std::string
const
257 return (filter_field_name_);
267 filter_limit_min_ = limit_min;
268 filter_limit_max_ = limit_max;
278 limit_min = filter_limit_min_;
279 limit_max = filter_limit_max_;
286 PCL_DEPRECATED(1, 12,
"use inherited FilterIndices::setNegative() instead")
288 setFilterLimitsNegative (const
bool limit_negative)
290 negative_ = limit_negative;
296 PCL_DEPRECATED(1, 12,
"use inherited FilterIndices::getNegative() instead")
298 getFilterLimitsNegative (
bool &limit_negative)
const
300 limit_negative = negative_;
306 PCL_DEPRECATED(1, 12,
"use inherited FilterIndices::getNegative() instead")
308 getFilterLimitsNegative ()
const
322 std::string filter_field_name_;
325 double filter_limit_min_;
328 double filter_limit_max_;
333 #ifdef PCL_NO_PRECOMPILE
334 #include <pcl/filters/impl/passthrough.hpp>
Defines all the PCL and non-PCL macros used.
void applyFilterIndices(std::vector< int > &indices)
Filtered results are indexed by an indices array.
void applyFilter(PCLPointCloud2 &output) override
Abstract filter method for point cloud.
shared_ptr< Filter< PointInT > > Ptr
PassThrough(bool extract_removed_indices=false)
Constructor.
typename PointCloud::ConstPtr PointCloudConstPtr
typename PointCloud::Ptr PointCloudPtr
void setFilterFieldName(const std::string &field_name)
Provide the name of the field to be used for filtering data.
shared_ptr< ::pcl::PCLPointCloud2 > Ptr
PassThrough(bool extract_removed_indices=false)
Constructor.
PCLPointCloud2::ConstPtr PCLPointCloud2ConstPtr
void applyFilter(std::vector< int > &indices) override
Abstract filter method for point cloud indices.
A point structure representing Euclidean xyz coordinates, and the RGB color.
#define PCL_DEPRECATED(Major, Minor, Message)
macro for compatibility across compilers and help remove old deprecated items for the Major....
PCLPointCloud2::Ptr PCLPointCloud2Ptr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
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.
shared_ptr< const Filter< PointInT > > ConstPtr
typename pcl::traits::fieldList< PointInT >::type FieldList
FilterIndices represents the base class for filters that are about binary point removal.
Filter represents the base filter class.
bool getFilterLimitsNegative() const
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
void setFilterFieldName(const std::string &field_name)
Provide the name of the field to be used for filtering data.
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.
PassThrough passes points in a cloud based on constraints for one particular field of the point type.
void setFilterLimitsNegative(const bool limit_negative)
Set to true if we want to return the data outside the interval specified by setFilterLimits (min,...
std::string filter_name_
The filter name.
shared_ptr< PointCloud< PointT > > Ptr
void applyFilter(std::vector< int > &indices) override
Filtered results are indexed by an indices array.
shared_ptr< const PointCloud< PointT > > ConstPtr
void setFilterLimits(const float &limit_min, const float &limit_max)
Set the numerical limits for the field for filtering data.
bool negative_
False = normal filter behavior (default), true = inverted behavior.
void getFilterLimits(float &limit_min, float &limit_max) const
Get the numerical limits for the field for filtering data.