42 #include <pcl/filters/filter_indices.h>
52 template<
typename Po
intT>
64 using Ptr = shared_ptr<CropBox<PointT> >;
65 using ConstPtr = shared_ptr<const CropBox<PointT> >;
70 CropBox (
bool extract_removed_indices =
false) :
72 min_pt_ (
Eigen::Vector4f (-1, -1, -1, 1)),
73 max_pt_ (
Eigen::Vector4f (1, 1, 1, 1)),
74 rotation_ (
Eigen::Vector3f::Zero ()),
75 translation_ (
Eigen::Vector3f::Zero ()),
76 transform_ (
Eigen::Affine3f::Identity ())
85 setMin (
const Eigen::Vector4f &min_pt)
93 inline Eigen::Vector4f
111 inline Eigen::Vector4f
123 translation_ = translation;
130 return (translation_);
139 rotation_ = rotation;
143 inline Eigen::Vector3f
155 transform_ = transform;
159 inline Eigen::Affine3f
182 Eigen::Vector4f min_pt_;
184 Eigen::Vector4f max_pt_;
186 Eigen::Vector3f rotation_;
188 Eigen::Vector3f translation_;
190 Eigen::Affine3f transform_;
216 CropBox (
bool extract_removed_indices =
false) :
218 min_pt_(
Eigen::Vector4f (-1, -1, -1, 1)),
219 max_pt_(
Eigen::Vector4f (1, 1, 1, 1)),
220 translation_ (
Eigen::Vector3f::Zero ()),
221 rotation_ (
Eigen::Vector3f::Zero ()),
222 transform_(
Eigen::Affine3f::Identity ())
224 filter_name_ =
"CropBox";
239 inline Eigen::Vector4f
257 inline Eigen::Vector4f
269 translation_ = translation;
273 inline Eigen::Vector3f
276 return (translation_);
285 rotation_ = rotation;
289 inline Eigen::Vector3f
301 transform_ = transform;
305 inline Eigen::Affine3f
337 #ifdef PCL_NO_PRECOMPILE
338 #include <pcl/filters/impl/crop_box.hpp>
void applyFilter(PCLPointCloud2 &output) override
Sample of point indices into a separate PointCloud.
Eigen::Vector3f getTranslation() const
Get the value of the box translation parameter as set by the user.
Eigen::Vector3f translation_
The 3D translation for the box.
void setMax(const Eigen::Vector4f &max_pt)
Set the maximum point of the box.
void applyFilter(Indices &indices) override
Sample of point indices.
void setTransform(const Eigen::Affine3f &transform)
Set a transformation that should be applied to the cloud before filtering.
Eigen::Affine3f transform_
The affine transform applied to the cloud.
PCL_MAKE_ALIGNED_OPERATOR_NEW CropBox(bool extract_removed_indices=false)
Constructor.
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.
Eigen::Vector3f getRotation() const
Get the value of the box rotatation parameter, as set by the user.
void setRotation(const Eigen::Vector3f &rotation)
Set a rotation value for the box.
void setTranslation(const Eigen::Vector3f &translation)
Set a translation value for the box.
Eigen::Vector3f rotation_
The 3D rotation for the box.
Eigen::Vector4f max_pt_
The maximum point of the box.
Eigen::Vector4f getMin() const
Get the value of the minimum point of the box, as set by the user.
Eigen::Affine3f getTransform() const
Get the value of the transformation parameter, as set by the user.
Eigen::Vector4f min_pt_
The minimum point of the box.
CropBox is a filter that allows the user to filter all the data inside of a given box.
void setRotation(const Eigen::Vector3f &rotation)
Set a rotation value for the box.
Eigen::Vector3f getRotation() const
Get the value of the box rotatation parameter, as set by the user.
void applyFilter(Indices &indices) override
Sample of point indices.
CropBox(bool extract_removed_indices=false)
Constructor.
void setTransform(const Eigen::Affine3f &transform)
Set a transformation that should be applied to the cloud before filtering.
Eigen::Vector4f getMax() const
Get the value of the maximum point of the box, as set by the user.
Eigen::Vector4f getMin() const
Get the value of the minimum point of the box, as set by the user.
shared_ptr< CropBox< PointT > > Ptr
void setMin(const Eigen::Vector4f &min_pt)
Set the minimum point of the box.
void setTranslation(const Eigen::Vector3f &translation)
Set a translation value for the box.
shared_ptr< const CropBox< PointT > > ConstPtr
Eigen::Vector3f getTranslation() const
Get the value of the box translation parameter as set by the user.
void setMax(const Eigen::Vector4f &max_pt)
Set the maximum point of the box.
Eigen::Affine3f getTransform() const
Get the value of the transformation parameter, as set by the user.
Filter represents the base filter class.
std::string filter_name_
The filter name.
FilterIndices represents the base class for filters that are about binary point removal.
PCLPointCloud2::Ptr PCLPointCloud2Ptr
PCLPointCloud2::ConstPtr PCLPointCloud2ConstPtr
typename PointCloud::Ptr PointCloudPtr
typename PointCloud::ConstPtr PointCloudConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
IndicesAllocator<> Indices
Type used for indices in PCL.
shared_ptr< ::pcl::PCLPointCloud2 > Ptr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.