Point Cloud Library (PCL)
1.10.1
|
40 #include <pcl/filters/boost.h>
41 #include <pcl/filters/filter.h>
46 template <
typename Po
intT>
53 p2_ (reinterpret_cast<
Pod&>(p2)),
61 *
reinterpret_cast<T*
>(data_ptr) =
static_cast<T
> (p1_[f_idx_++]);
65 const Eigen::VectorXf &p1_;
71 template <
typename Po
intT>
77 : p1_ (reinterpret_cast<const
Pod&>(p1)), p2_ (p2), f_idx_ (0) { }
84 p2_[f_idx_++] =
static_cast<float> (*
reinterpret_cast<const T*
>(data_ptr));
98 template <
typename Po
intT>
113 he () : ix (), iy (), iz (), count (0) {}
116 Eigen::VectorXf centroid;
148 for (std::size_t i = 0; i <
histsize_; i++)
172 for (std::size_t i = 0; i <
histsize_; i++)
199 inline Eigen::Vector3f
241 flush (
PointCloud &output, std::size_t op, he *hhe,
int rgba_index,
int centroid_size);
245 #ifdef PCL_NO_PRECOMPILE
246 #include <pcl/filters/impl/approximate_voxel_grid.hpp>
Helper functor structure for copying data between an Eigen::VectorXf and a PointT.
void setDownsampleAllData(bool downsample)
Set to true if all fields need to be downsampled, or false if just XYZ.
This file defines compatibility wrappers for low level I/O functions.
typename PointCloud::ConstPtr PointCloudConstPtr
typename PointCloud::Ptr PointCloudPtr
Eigen::Vector3f getLeafSize() const
Get the voxel grid leaf size.
typename pcl::traits::fieldList< PointT >::type FieldList
bool downsample_all_data_
Set to true if all fields need to be downsampled, or false if just XYZ.
struct he * history_
history buffer
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< const ApproximateVoxelGrid< PointT > > ConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.
xNdCopyEigenPointFunctor(const Eigen::VectorXf &p1, PointT &p2)
typename traits::POD< PointT >::type Pod
ApproximateVoxelGrid & operator=(const ApproximateVoxelGrid &src)
Copy operator.
ApproximateVoxelGrid(const ApproximateVoxelGrid &src)
Copy constructor.
~ApproximateVoxelGrid()
Destructor.
xNdCopyPointEigenFunctor(const PointT &p1, Eigen::VectorXf &p2)
Helper functor structure for copying data between an Eigen::VectorXf and a PointT.
std::size_t histsize_
history buffer size, power of 2
shared_ptr< ApproximateVoxelGrid< PointT > > Ptr
ApproximateVoxelGrid()
Empty constructor.
Filter represents the base filter class.
void setLeafSize(float lx, float ly, float lz)
Set the voxel grid leaf size.
std::string filter_name_
The filter name.
shared_ptr< PointCloud< PointT > > Ptr
bool getDownsampleAllData() const
Get the state of the internal downsampling parameter (true if all fields need to be downsampled,...
Eigen::Vector3f leaf_size_
The size of a leaf.
void setLeafSize(const Eigen::Vector3f &leaf_size)
Set the voxel grid leaf size.
shared_ptr< const PointCloud< PointT > > ConstPtr
typename traits::POD< PointT >::type Pod
void flush(PointCloud &output, std::size_t op, he *hhe, int rgba_index, int centroid_size)
Write a single point from the hash to the output cloud.
Eigen::Array3f inverse_leaf_size_
Compute 1/leaf_size_ to avoid division later.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
void applyFilter(PointCloud &output) override
Downsample a Point Cloud using a voxelized grid approach.
ApproximateVoxelGrid assembles a local 3D grid over a given PointCloud, and downsamples + filters the...