40 #ifndef PCL_FILTERS_CROP_BOX_H_ 41 #define PCL_FILTERS_CROP_BOX_H_ 44 #include <pcl/filters/filter_indices.h> 45 #include <pcl/common/transforms.h> 46 #include <pcl/common/eigen.h> 56 template<
typename Po
intT>
67 typedef boost::shared_ptr< CropBox<PointT> >
Ptr;
68 typedef boost::shared_ptr< const CropBox<PointT> >
ConstPtr;
73 CropBox (
bool extract_removed_indices =
false) :
75 min_pt_ (
Eigen::Vector4f (-1, -1, -1, 1)),
76 max_pt_ (
Eigen::Vector4f (1, 1, 1, 1)),
77 rotation_ (
Eigen::Vector3f::Zero ()),
78 translation_ (
Eigen::Vector3f::Zero ()),
79 transform_ (
Eigen::Affine3f::Identity ())
88 setMin (
const Eigen::Vector4f &min_pt)
96 inline Eigen::Vector4f
114 inline Eigen::Vector4f
126 translation_ = translation;
133 return (translation_);
142 rotation_ = rotation;
146 inline Eigen::Vector3f
158 transform_ = transform;
162 inline Eigen::Affine3f
191 Eigen::Vector4f min_pt_;
193 Eigen::Vector4f max_pt_;
195 Eigen::Vector3f rotation_;
197 Eigen::Vector3f translation_;
199 Eigen::Affine3f transform_;
223 CropBox (
bool extract_removed_indices =
false) :
225 min_pt_(
Eigen::Vector4f (-1, -1, -1, 1)),
226 max_pt_(
Eigen::Vector4f (1, 1, 1, 1)),
227 translation_ (
Eigen::Vector3f::Zero ()),
228 rotation_ (
Eigen::Vector3f::Zero ()),
229 transform_(
Eigen::Affine3f::Identity ())
231 filter_name_ =
"CropBox";
246 inline Eigen::Vector4f
264 inline Eigen::Vector4f
276 translation_ = translation;
280 inline Eigen::Vector3f
283 return (translation_);
292 rotation_ = rotation;
296 inline Eigen::Vector3f
308 transform_ = transform;
312 inline Eigen::Affine3f
329 applyFilter (std::vector<int> &indices);
344 #ifdef PCL_NO_PRECOMPILE 345 #include <pcl/filters/impl/crop_box.hpp> 348 #endif // PCL_FILTERS_CROP_BOX_H_ void setRotation(const Eigen::Vector3f &rotation)
Set a rotation value for the box.
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< const CropBox< PointT > > ConstPtr
Eigen::Vector4f getMax() const
Get the value of the maxiomum point of the box, as set by the user.
void setMin(const Eigen::Vector4f &min_pt)
Set the minimum point of the box.
This file defines compatibility wrappers for low level I/O functions.
Eigen::Vector4f min_pt_
The minimum point of the box.
Eigen::Affine3f getTransform() const
Get the value of the transformation parameter, as set by the user.
boost::shared_ptr< ::pcl::PCLPointCloud2 const > PCLPointCloud2ConstPtr
boost::shared_ptr< ::pcl::PCLPointCloud2 > Ptr
boost::shared_ptr< PointCloud< PointT > > Ptr
void setTransform(const Eigen::Affine3f &transform)
Set a transformation that should be applied to the cloud before filtering.
FilterIndices represents the base class for filters that are about binary point removal.
PointCloud::Ptr PointCloudPtr
Eigen::Vector4f getMin() const
Get the value of the minimum point of the box, as set by the user.
Filter represents the base filter class.
boost::shared_ptr< CropBox< PointT > > Ptr
CropBox is a filter that allows the user to filter all the data inside of a given box.
Defines all the PCL implemented PointT point type structures.
Eigen::Affine3f getTransform() const
Get the value of the transformation parameter, as set by the user.
Eigen::Vector3f rotation_
The 3D rotation for the box.
void setTransform(const Eigen::Affine3f &transform)
Set a transformation that should be applied to the cloud before filtering.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
CropBox(bool extract_removed_indices=false)
Constructor.
Eigen::Vector3f translation_
The 3D translation for the box.
Eigen::Vector3f getTranslation() const
Get the value of the box translation parameter as set by the user.
PointCloud represents the base class in PCL for storing collections of 3D points.
void setRotation(const Eigen::Vector3f &rotation)
Set a rotation value for the box.
Eigen::Vector4f getMin() const
Get the value of the minimum point of the box, as set by the user.
boost::shared_ptr< ::pcl::PCLPointCloud2 > PCLPointCloud2Ptr
Eigen::Affine3f transform_
The affine transform applied to the cloud.
Eigen::Vector3f getTranslation() const
Get the value of the box translation parameter as set by the user.
Eigen::Vector4f max_pt_
The maximum point of the box.
void setMax(const Eigen::Vector4f &max_pt)
Set the maximum point of the box.
CropBox(bool extract_removed_indices=false)
Constructor.
void setTranslation(const Eigen::Vector3f &translation)
Set a translation value for the box.
Eigen::Vector4f getMax() const
Get the value of the maxiomum point of the box, as set by the user.
std::string filter_name_
The filter name.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setMax(const Eigen::Vector4f &max_pt)
Set the maximum point of the box.
Eigen::Vector3f getRotation() const
Get the value of the box rotatation parameter, as set by the user.
void setTranslation(const Eigen::Vector3f &translation)
Set a translation value for the box.
void setMin(const Eigen::Vector4f &min_pt)
Set the minimum point of the box.
void applyFilter(PointCloud &output)
Sample of point indices into a separate PointCloud.
Eigen::Vector3f getRotation() const
Get the value of the box rotatation parameter, as set by the user.