Point Cloud Library (PCL)
1.10.1
|
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>
163 assert(pointIdx_arg <
static_cast<int>(this->input_->points.size()));
165 const PointT& point = this->input_->points[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_->points[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>
This file defines compatibility wrappers for low level I/O functions.
void reset() override
Reset leaf container.
typename OctreeT::BranchNode BranchNode
shared_ptr< OctreePointCloudVoxelCentroid< PointT, LeafContainerT > > Ptr
~OctreePointCloudVoxelCentroid()
Empty class deconstructor.
Octree pointcloud voxel centroid class
A point structure representing Euclidean xyz coordinates, and the RGB color.
bool getVoxelCentroidAtPoint(const int &point_idx_arg, PointT &voxel_centroid_arg) const
Get centroid for a single voxel addressed by a PointT point from input cloud.
shared_ptr< const OctreePointCloudVoxelCentroid< PointT, LeafContainerT > > ConstPtr
void getCentroid(PointT ¢roid_arg) const
Calculate centroid of voxel.
typename OctreeT::LeafNode LeafNode
typename OctreeT::BranchNode BranchNode
bool operator==(const OctreeContainerBase &) const override
Equal comparison operator - set to false.
void addPoint(const PointT &new_point)
Add new point to voxel.
~OctreePointCloudVoxelCentroidContainer()
Empty class deconstructor.
virtual OctreePointCloudVoxelCentroidContainer * deepCopy() const
deep copy function
void addPointIdx(const int pointIdx_arg) override
Add DataT object to leaf node at octree key.
OctreePointCloudVoxelCentroid(const double resolution_arg)
OctreePointCloudVoxelCentroids class constructor.
OctreePointCloudVoxelCentroidContainer()
Class initialization.
Octree pointcloud voxel centroid leaf node class
typename OctreeT::LeafNode LeafNode
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
Octree container class that can serve as a base to construct own leaf node container classes.