Point Cloud Library (PCL)
1.10.0
|
42 #include <pcl/octree/octree_pointcloud.h>
52 template<
typename Po
intT>
92 point_sum_ += new_point;
105 centroid_arg = point_sum_;
106 centroid_arg /=
static_cast<float> (point_counter_);
110 centroid_arg *= 0.0f;
125 unsigned int point_counter_;
139 typename LeafContainerT = OctreePointCloudVoxelCentroidContainer<PointT> ,
140 typename BranchContainerT = OctreeContainerEmpty >
173 assert (pointIdx_arg <
static_cast<int> (this->input_->points.size ()));
175 const PointT& point = this->input_->points[pointIdx_arg];
178 this->adoptBoundingBoxToPoint (point);
181 this->genOctreeKeyforPoint (point, key);
184 LeafContainerT* container = this->createLeaf(key);
185 container->addPoint (point);
195 getVoxelCentroidAtPoint (
const PointT& point_arg,
PointT& voxel_centroid_arg)
const;
206 return (this->getVoxelCentroidAtPoint (this->input_->points[point_idx_arg], voxel_centroid_arg));
222 getVoxelCentroidsRecursive (
const BranchNode* branch_arg,
231 #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
std::vector< PointT, Eigen::aligned_allocator< PointT > > AlignedPointTVector
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.