Point Cloud Library (PCL)
1.9.1
|
40 #ifndef PCL_FILTERS_PASSTHROUGH_H_
41 #define PCL_FILTERS_PASSTHROUGH_H_
43 #include <pcl/filters/filter_indices.h>
79 template <
typename Po
intT>
90 typedef boost::shared_ptr< PassThrough<PointT> >
Ptr;
91 typedef boost::shared_ptr< const PassThrough<PointT> >
ConstPtr;
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_;
213 std::string filter_field_name_;
216 float filter_limit_min_;
219 float filter_limit_max_;
242 user_filter_value_ (
std::numeric_limits<float>::quiet_NaN ()),
243 filter_field_name_ (
""), filter_limit_min_ (-FLT_MAX), filter_limit_max_ (FLT_MAX),
244 filter_limit_negative_ (false)
246 filter_name_ =
"PassThrough";
260 keep_organized_ = val;
267 return (keep_organized_);
278 user_filter_value_ = val;
288 filter_field_name_ = field_name;
292 inline std::string
const
295 return (filter_field_name_);
305 filter_limit_min_ = limit_min;
306 filter_limit_max_ = limit_max;
316 limit_min = filter_limit_min_;
317 limit_max = filter_limit_max_;
327 filter_limit_negative_ = limit_negative;
336 limit_negative = filter_limit_negative_;
345 return (filter_limit_negative_);
356 bool keep_organized_;
361 float user_filter_value_;
364 std::string filter_field_name_;
367 double filter_limit_min_;
370 double filter_limit_max_;
373 bool filter_limit_negative_;
378 #ifdef PCL_NO_PRECOMPILE
379 #include <pcl/filters/impl/passthrough.hpp>
382 #endif // PCL_FILTERS_PASSTHROUGH_H_
void applyFilterIndices(std::vector< int > &indices)
Filtered results are indexed by an indices array.
This file defines compatibility wrappers for low level I/O functions.
boost::shared_ptr< PointCloud< PointInT > > Ptr
PassThrough(bool extract_removed_indices=false)
Constructor.
void applyFilter(PointCloud &output)
Filtered results are stored in a separate point cloud.
void setUserFilterValue(float val)
Provide a value that the filtered points should be set to instead of removing them.
void setFilterFieldName(const std::string &field_name)
Provide the name of the field to be used for filtering data.
void setKeepOrganized(bool val)
Set whether the filtered points should be kept and set to the value given through setUserFilterValue ...
PassThrough(bool extract_removed_indices=false)
Constructor.
pcl::traits::fieldList< PointT >::type FieldList
PointCloud::ConstPtr PointCloudConstPtr
void setFilterLimitsNegative(const bool limit_negative)
Set to true if we want to return the data outside the interval specified by setFilterLimits (min,...
PointCloud represents the base class in PCL for storing collections of 3D points.
boost::shared_ptr< ::pcl::PCLPointCloud2 const > PCLPointCloud2ConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.
boost::shared_ptr< const PassThrough< PointT > > ConstPtr
void applyFilter(std::vector< int > &indices)
Filtered results are indexed by an indices array.
void getFilterLimitsNegative(bool &limit_negative) const
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
void setFilterLimits(const double &limit_min, const double &limit_max)
Set the field filter limits.
boost::shared_ptr< PassThrough< PointT > > Ptr
FilterIndices< PointT >::PointCloud PointCloud
const std::string getFilterFieldName() const
Get the name of the field used for filtering.
FilterIndices represents the base class for filters that are about binary point removal.
Filter represents the base filter class.
void getFilterLimitsNegative(bool &limit_negative) const
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
bool getFilterLimitsNegative() const
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
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.
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.
boost::shared_ptr< ::pcl::PCLPointCloud2 > PCLPointCloud2Ptr
boost::shared_ptr< const PointCloud< PointInT > > ConstPtr
const std::string getFilterFieldName() const
Retrieve the name of the field to be used for filtering data.
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
PointCloud::Ptr PointCloudPtr
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.
bool getKeepOrganized() const
Obtain the value of the internal keep_organized_ parameter.
boost::shared_ptr< ::pcl::PCLPointCloud2 > Ptr