42 #include <pcl/octree/octree_pointcloud.h>
51 template <
typename Po
intT>
86 point_sum_ += new_point;
98 centroid_arg = point_sum_;
99 centroid_arg /=
static_cast<float>(point_counter_);
102 centroid_arg *= 0.0f;
117 unsigned int point_counter_;
130 template <
typename PointT,
131 typename LeafContainerT = OctreePointCloudVoxelCentroidContainer<PointT>,
132 typename BranchContainerT = OctreeContainerEmpty>
136 using Ptr = shared_ptr<OctreePointCloudVoxelCentroid<PointT, LeafContainerT>>;
138 shared_ptr<const OctreePointCloudVoxelCentroid<PointT, LeafContainerT>>;
163 assert(pointIdx_arg <
static_cast<int>(this->input_->size()));
165 const PointT& point = (*this->input_)[pointIdx_arg];
168 this->adoptBoundingBoxToPoint(point);
171 this->genOctreeKeyforPoint(point, key);
174 LeafContainerT* container = this->createLeaf(key);
175 container->addPoint(point);
184 getVoxelCentroidAtPoint(
const PointT& point_arg,
PointT& voxel_centroid_arg)
const;
196 return (this->getVoxelCentroidAtPoint((*this->input_)[point_idx_arg],
197 voxel_centroid_arg));
208 AlignedPointTVector& voxel_centroid_list_arg)
const;
218 getVoxelCentroidsRecursive(
219 const BranchNode* branch_arg,
222 AlignedPointTVector& voxel_centroid_list_arg)
const;
229 #include <pcl/octree/impl/octree_pointcloud_voxelcentroid.hpp>