Point Cloud Library (PCL)
1.9.1
|
38 #ifndef PCL_FILTERS_APPROXIMATE_VOXEL_GRID_MAP_H_
39 #define PCL_FILTERS_APPROXIMATE_VOXEL_GRID_MAP_H_
41 #include <pcl/filters/boost.h>
42 #include <pcl/filters/filter.h>
47 template <
typename Po
intT>
54 p2_ (reinterpret_cast<
Pod&>(p2)),
62 *
reinterpret_cast<T*
>(data_ptr) =
static_cast<T
> (p1_[f_idx_++]);
66 const Eigen::VectorXf &p1_;
72 template <
typename Po
intT>
78 : p1_ (reinterpret_cast<const
Pod&>(p1)), p2_ (p2), f_idx_ (0) { }
85 p2_[f_idx_++] =
static_cast<float> (*
reinterpret_cast<const T*
>(data_ptr));
99 template <
typename Po
intT>
114 he () : ix (), iy (), iz (), count (0), centroid () {}
117 Eigen::VectorXf centroid;
122 typedef boost::shared_ptr< ApproximateVoxelGrid<PointT> >
Ptr;
123 typedef boost::shared_ptr< const ApproximateVoxelGrid<PointT> >
ConstPtr;
200 inline Eigen::Vector3f
242 flush (
PointCloud &output,
size_t op, he *hhe,
int rgba_index,
int centroid_size);
246 #ifdef PCL_NO_PRECOMPILE
247 #include <pcl/filters/impl/approximate_voxel_grid.hpp>
250 #endif //#ifndef PCL_FILTERS_VOXEL_GRID_MAP_H_
boost::shared_ptr< ApproximateVoxelGrid< PointT > > Ptr
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.
boost::shared_ptr< PointCloud< PointT > > Ptr
void applyFilter(PointCloud &output)
Downsample a Point Cloud using a voxelized grid approach.
Eigen::Vector3f getLeafSize() const
Get the voxel grid leaf size.
traits::POD< PointT >::type Pod
bool downsample_all_data_
Set to true if all fields need to be downsampled, or false if just XYZ.
struct he * history_
history buffer
traits::POD< PointT >::type Pod
PointCloud represents the base class in PCL for storing collections of 3D points.
A point structure representing Euclidean xyz coordinates, and the RGB color.
xNdCopyEigenPointFunctor(const Eigen::VectorXf &p1, PointT &p2)
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.
boost::shared_ptr< const ApproximateVoxelGrid< PointT > > ConstPtr
PointCloud::Ptr PointCloudPtr
ApproximateVoxelGrid()
Empty constructor.
PointCloud::ConstPtr PointCloudConstPtr
Filter represents the base filter class.
void flush(PointCloud &output, size_t op, he *hhe, int rgba_index, int centroid_size)
Write a single point from the hash to the output cloud.
void setLeafSize(float lx, float ly, float lz)
Set the voxel grid leaf size.
std::string filter_name_
The filter name.
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.
size_t histsize_
history buffer size, power of 2
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
void setLeafSize(const Eigen::Vector3f &leaf_size)
Set the voxel grid leaf size.
pcl::traits::fieldList< PointT >::type FieldList
Eigen::Array3f inverse_leaf_size_
Compute 1/leaf_size_ to avoid division later.
ApproximateVoxelGrid assembles a local 3D grid over a given PointCloud, and downsamples + filters the...