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< PointCloud< PointT > > Ptr
~ApproximateVoxelGrid()
Destructor.
ApproximateVoxelGrid & operator=(const ApproximateVoxelGrid &src)
Copy operator.
PointCloud::ConstPtr PointCloudConstPtr
bool getDownsampleAllData() const
Get the state of the internal downsampling parameter (true if all fields need to be downsampled...
This file defines compatibility wrappers for low level I/O functions.
xNdCopyEigenPointFunctor(const Eigen::VectorXf &p1, PointT &p2)
boost::shared_ptr< const ApproximateVoxelGrid< PointT > > ConstPtr
ApproximateVoxelGrid()
Empty constructor.
boost::shared_ptr< ApproximateVoxelGrid< PointT > > Ptr
ApproximateVoxelGrid assembles a local 3D grid over a given PointCloud, and downsamples + filters the...
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
void applyFilter(PointCloud &output)
Downsample a Point Cloud using a voxelized grid approach.
size_t histsize_
history buffer size, power of 2
PointCloud::Ptr PointCloudPtr
Filter represents the base filter class.
Eigen::Array3f inverse_leaf_size_
Compute 1/leaf_size_ to avoid division later.
traits::POD< PointT >::type Pod
void setLeafSize(float lx, float ly, float lz)
Set the voxel grid leaf size.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
xNdCopyPointEigenFunctor(const PointT &p1, Eigen::VectorXf &p2)
Eigen::Vector3f leaf_size_
The size of a leaf.
void setDownsampleAllData(bool downsample)
Set to true if all fields need to be downsampled, or false if just XYZ.
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.
Helper functor structure for copying data between an Eigen::VectorXf and a PointT.
bool downsample_all_data_
Set to true if all fields need to be downsampled, or false if just XYZ.
Eigen::Vector3f getLeafSize() const
Get the voxel grid leaf size.
struct he * history_
history buffer
traits::POD< PointT >::type Pod
Helper functor structure for copying data between an Eigen::VectorXf and a PointT.
pcl::traits::fieldList< PointT >::type FieldList
std::string filter_name_
The filter name.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setLeafSize(const Eigen::Vector3f &leaf_size)
Set the voxel grid leaf size.
ApproximateVoxelGrid(const ApproximateVoxelGrid &src)
Copy constructor.