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