38 #ifndef PCL_FILTERS_APPROXIMATE_VOXEL_GRID_MAP_H_
39 #define PCL_FILTERS_APPROXIMATE_VOXEL_GRID_MAP_H_
42 #include <boost/mpl/size.hpp>
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;
124 leaf_size_ (Eigen::Vector3f::Ones ()),
125 inverse_leaf_size_ (Eigen::Array3f::Ones ()),
126 downsample_all_data_ (true), histsize_ (512),
127 history_ (new he[histsize_])
129 filter_name_ =
"ApproximateVoxelGrid";
137 leaf_size_ (src.leaf_size_),
138 inverse_leaf_size_ (src.inverse_leaf_size_),
139 downsample_all_data_ (src.downsample_all_data_),
140 histsize_ (src.histsize_),
143 history_ =
new he[histsize_];
144 for (
size_t i = 0; i < histsize_; i++)
145 history_[i] = src.history_[i];
154 leaf_size_ = src.leaf_size_;
155 inverse_leaf_size_ = src.inverse_leaf_size_;
156 downsample_all_data_ = src.downsample_all_data_;
157 histsize_ = src.histsize_;
158 history_ =
new he[histsize_];
159 for (
size_t i = 0; i < histsize_; i++)
160 history_[i] = src.history_[i];
170 leaf_size_ = leaf_size;
171 inverse_leaf_size_ = Eigen::Array3f::Ones () / leaf_size_.array ();
186 inline Eigen::Vector3f
203 Eigen::Vector3f leaf_size_;
206 Eigen::Array3f inverse_leaf_size_;
209 bool downsample_all_data_;
228 flush(
PointCloud &output,
size_t op, he *hhe,
int rgba_index,
int centroid_size);
232 #endif //#ifndef PCL_FILTERS_VOXEL_GRID_MAP_H_