Point Cloud Library (PCL)
1.11.1-dev
|
41 #include <pcl/octree/octree_base.h>
42 #include <pcl/point_cloud.h>
68 typename LeafContainerT = OctreeContainerPointIndices,
69 typename BranchContainerT = OctreeContainerEmpty,
70 typename OctreeT = OctreeBase<LeafContainerT, BranchContainerT>>
102 shared_ptr<OctreePointCloud<PointT, LeafContainerT, BranchContainerT, OctreeT>>;
109 std::vector<PointXYZ, Eigen::aligned_allocator<PointXYZ>>;
136 inline PointCloudConstPtr
223 PointCloudPtr cloud_arg,
253 const double point_y_arg,
254 const double point_z_arg)
const;
284 const Eigen::Vector3f&
end,
286 float precision = 0.2);
320 const double min_y_arg,
321 const double min_z_arg,
322 const double max_x_arg,
323 const double max_y_arg,
324 const double max_z_arg);
335 const double max_y_arg,
336 const double max_z_arg);
361 double& max_z_arg)
const;
402 Eigen::Vector3f& min_pt,
403 Eigen::Vector3f& max_pt)
const
442 unsigned char child_idx,
443 unsigned int depth_mask);
490 return (!((point_idx_arg.x <
min_x_) || (point_idx_arg.y <
min_y_) ||
491 (point_idx_arg.z <
min_z_) || (point_idx_arg.x >=
max_x_) ||
492 (point_idx_arg.y >=
max_y_) || (point_idx_arg.z >=
max_z_)));
510 const double point_y_arg,
511 const double point_z_arg,
539 unsigned int tree_depth_arg,
551 unsigned int tree_depth_arg,
552 Eigen::Vector3f& min_pt,
553 Eigen::Vector3f& max_pt)
const;
605 #ifdef PCL_NO_PRECOMPILE
606 #include <pcl/octree/impl/octree_pointcloud.hpp>
double getVoxelSquaredDiameter() const
Calculates the squared diameter of a voxel at leaf depth.
std::size_t max_objs_per_leaf_
Amount of DataT objects per leafNode before expanding branch.
shared_ptr< Indices > IndicesPtr
void deleteVoxelAtPoint(const PointT &point_arg)
Delete leaf node / voxel at given point.
void genOctreeKeyforPoint(const PointT &point_arg, OctreeKey &key_arg) const
Generate octree key for voxel at a given point.
void deleteTree()
Delete the octree structure and its leaf nodes.
int getOccupiedVoxelCenters(AlignedPointTVector &voxel_center_list_arg) const
Get a PointT vector of centers of all occupied voxels.
bool isPointWithinBoundingBox(const PointT &point_idx_arg) const
Checks if given point is within the bounding box of the octree.
typename PointCloud::ConstPtr PointCloudConstPtr
double resolution_
Octree resolution.
void getKeyBitSize()
Define octree key setting and octree depth based on defined bounding box.
shared_ptr< const Indices > IndicesConstPtr
void deleteTree()
Delete the octree structure and its leaf nodes.
virtual bool genOctreeKeyForDataT(const int &data_arg, OctreeKey &key_arg) const
Virtual method for generating octree key for a given point index.
int getOccupiedVoxelCentersRecursive(const BranchNode *node_arg, const OctreeKey &key_arg, AlignedPointTVector &voxel_center_list_arg) const
Recursively search the tree for all leaf nodes and return a vector of voxel centers.
void addPointsFromInputCloud()
Add points from input point cloud to octree.
int getApproxIntersectedVoxelCentersBySegment(const Eigen::Vector3f &origin, const Eigen::Vector3f &end, AlignedPointTVector &voxel_center_list, float precision=0.2)
Get a PointT vector of centers of voxels intersected by a line segment.
LeafContainerT * findLeafAtPoint(const PointT &point_arg) const
Find octree leaf node at a given point.
unsigned int octree_depth_
Octree depth.
PointCloud represents the base class in PCL for storing collections of 3D points.
void adoptBoundingBoxToPoint(const PointT &point_idx_arg)
Grow the bounding box/octree until point fits.
void addPointToCloud(const PointT &point_arg, PointCloudPtr cloud_arg)
Add point simultaneously to octree and input point cloud.
void defineBoundingBox()
Investigate dimensions of pointcloud data set and define corresponding bounding box for octree.
A point structure representing Euclidean xyz coordinates, and the RGB color.
virtual void addPointIdx(const int point_idx_arg)
Add point at index from input pointcloud dataset to octree.
const PointT & getPointByIndex(const unsigned int index_arg) const
Get point at index from input pointcloud dataset.
Abstract octree leaf class
void setInputCloud(const PointCloudConstPtr &cloud_arg, const IndicesConstPtr &indices_arg=IndicesConstPtr())
Provide a pointer to the input data set.
bool bounding_box_defined_
Flag indicating if octree has defined bounding box.
shared_ptr< const OctreePointCloud< PointT, OctreeContainerPointIndex, OctreeContainerEmpty, OctreeBase< OctreeContainerPointIndex, OctreeContainerEmpty > > > ConstPtr
const IndicesConstPtr getIndices() const
Get a pointer to the vector of indices used.
shared_ptr< const std::vector< int > > IndicesConstPtr
void setEpsilon(double eps)
Set the search epsilon precision (error bound) for nearest neighbors searches.
OctreeContainerPointIndices * findLeaf(unsigned int idx_x_arg, unsigned int idx_y_arg, unsigned int idx_z_arg)
Find leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
OctreeLeafNode< OctreeContainerPointIndices > LeafNode
Abstract octree branch class
double getEpsilon() const
Get the search epsilon precision (error bound) for nearest neighbors searches.
Abstract octree iterator class
bool dynamic_depth_enabled_
Enable dynamic_depth.
OctreeBranchNode< OctreeContainerEmpty > BranchNode
typename PointCloud::Ptr PointCloudPtr
typename OctreeT::BranchNode BranchNode
double getVoxelSquaredSideLen() const
Calculates the squared voxel cube side length at leaf level.
shared_ptr< OctreePointCloud< PointT, OctreeContainerPointIndex, OctreeContainerEmpty, OctreeBase< OctreeContainerPointIndex, OctreeContainerEmpty > > > Ptr
bool isVoxelOccupiedAtPoint(const PointT &point_arg) const
Check if voxel at given point exist.
void addPointFromCloud(const int point_idx_arg, IndicesPtr indices_arg)
Add point at given index from input point cloud to octree.
double epsilon_
Epsilon precision (error bound) for nearest neighbors searches.
shared_ptr< PointCloud< PointT > > Ptr
IndicesConstPtr indices_
A pointer to the vector of point indices to use.
void genVoxelBoundsFromOctreeKey(const OctreeKey &key_arg, unsigned int tree_depth_arg, Eigen::Vector3f &min_pt, Eigen::Vector3f &max_pt) const
Generate bounds of an octree voxel using octree key and tree depth arguments.
void genLeafNodeCenterFromOctreeKey(const OctreeKey &key_arg, PointT &point_arg) const
Generate a point at center of leaf node voxel.
void setResolution(double resolution_arg)
Set/change the octree voxel resolution.
unsigned int getTreeDepth() const
Get the maximum depth of the octree.
shared_ptr< const PointCloud< PointT > > ConstPtr
void getBoundingBox(double &min_x_arg, double &min_y_arg, double &min_z_arg, double &max_x_arg, double &max_y_arg, double &max_z_arg) const
Get bounding box for octree.
unsigned int getCurrentOctreeDepth() const
Get the current depth level of octree.
double getResolution() const
Get octree voxel resolution.
shared_ptr< std::vector< int > > IndicesPtr
PointCloudConstPtr getInputCloud() const
Get a pointer to the input point cloud dataset.
void getVoxelBounds(const OctreeIteratorBase< OctreeT > &iterator, Eigen::Vector3f &min_pt, Eigen::Vector3f &max_pt) const
Generate bounds of the current voxel of an octree iterator.
std::vector< PointXYZ, Eigen::aligned_allocator< PointXYZ > > AlignedPointXYZVector
std::size_t leaf_count_
Amount of leaf nodes
void enableDynamicDepth(std::size_t maxObjsPerLeaf)
Enable dynamic octree structure.
std::vector< PointT, Eigen::aligned_allocator< PointT > > AlignedPointTVector
void expandLeafNode(LeafNode *leaf_node, BranchNode *parent_branch, unsigned char child_idx, unsigned int depth_mask)
Add point at index from input pointcloud dataset to octree.
OctreePointCloud(const double resolution_arg)
Octree pointcloud constructor.
PointCloudConstPtr input_
Pointer to input point cloud dataset.
OctreeBase< OctreeContainerPointIndices, OctreeContainerEmpty > OctreeT
typename OctreeT::LeafNode LeafNode
void genVoxelCenterFromOctreeKey(const OctreeKey &key_arg, unsigned int tree_depth_arg, PointT &point_arg) const
Generate a point at center of octree voxel at given tree level.
const OctreeKey & getCurrentOctreeKey() const
Get octree key for the current iterator octree node.