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 setKeepOrganized(bool val)
Set whether the filtered points should be kept and set to the value given through setUserFilterValue ...
void setFilterLimits(const double &limit_min, const double &limit_max)
Set the field filter limits.
pcl::traits::fieldList< PointT >::type FieldList
void applyFilter(std::vector< int > &indices)
Filtered results are indexed by an indices array.
boost::shared_ptr< ::pcl::PCLPointCloud2 > Ptr
void getFilterLimits(double &limit_min, double &limit_max)
Get the field filter limits (min/max) set by the user.
FilterIndices< PointT >::PointCloud PointCloud
boost::shared_ptr< const PassThrough< PointT > > ConstPtr
void applyFilter(PointCloud &output)
Filtered results are stored in a separate point cloud.
std::string filter_name_
The filter name.
void setFilterFieldName(const std::string &field_name)
Provide the name of the field to be used for filtering data.
Filter represents the base filter class.
bool negative_
False = normal filter behavior (default), true = inverted behavior.
void applyFilterIndices(std::vector< int > &indices)
Filtered results are indexed by an indices array.
void setFilterLimitsNegative(const bool limit_negative)
Set to true if we want to return the data outside the interval specified by setFilterLimits (min...
boost::shared_ptr< ::pcl::PCLPointCloud2 const > PCLPointCloud2ConstPtr
PointCloud::Ptr PointCloudPtr
PassThrough(bool extract_removed_indices=false)
Constructor.
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
void setFilterLimits(const float &limit_min, const float &limit_max)
Set the numerical limits for the field for filtering data.
bool getFilterLimitsNegative()
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false)...
bool getFilterLimitsNegative()
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false)...
FilterIndices represents the base class for filters that are about binary point removal.
boost::shared_ptr< PassThrough< PointT > > Ptr
bool getKeepOrganized()
Obtain the value of the internal keep_organized_ parameter.
boost::shared_ptr< PointCloud< PointT > > Ptr
void setUserFilterValue(float val)
Provide a value that the filtered points should be set to instead of removing them.
std::string const getFilterFieldName()
Get the name of the field used for filtering.
boost::shared_ptr< ::pcl::PCLPointCloud2 > PCLPointCloud2Ptr
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
void getFilterLimits(float &limit_min, float &limit_max)
Get the numerical limits for the field for filtering data.
PointCloud::ConstPtr PointCloudConstPtr
void getFilterLimitsNegative(bool &limit_negative)
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false)...
void getFilterLimitsNegative(bool &limit_negative)
Get whether the data outside the interval (min/max) is to be returned (true) or inside (false)...
PassThrough(bool extract_removed_indices=false)
Constructor.
std::string const getFilterFieldName()
Retrieve the name of the field to be used for filtering data.
void setFilterLimitsNegative(const bool limit_negative)
Set to true if we want to return the data outside the interval specified by setFilterLimits (min...
PassThrough passes points in a cloud based on constraints for one particular field of the point type...
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setFilterFieldName(const std::string &field_name)
Provide the name of the field to be used for filtering data.