Point Cloud Library (PCL)
1.3.1
|
Octree pointcloud class More...
#include <pcl/octree/octree_pointcloud.h>
Public Types | |
typedef boost::shared_ptr < std::vector< int > > | IndicesPtr |
typedef boost::shared_ptr < const std::vector< int > > | IndicesConstPtr |
typedef pcl::PointCloud< PointT > | PointCloud |
typedef boost::shared_ptr < PointCloud > | PointCloudPtr |
typedef boost::shared_ptr < const PointCloud > | PointCloudConstPtr |
typedef OctreePointCloud < PointT, LeafT, OctreeBase < int, LeafT > > | SingleBuffer |
typedef OctreePointCloud < PointT, LeafT, Octree2BufBase< int, LeafT > > | DoubleBuffer |
typedef OctreePointCloud < PointT, LeafT, OctreeLowMemBase< int, LeafT > > | LowMem |
typedef boost::shared_ptr < OctreePointCloud< PointT, LeafT, OctreeT > > | Ptr |
typedef boost::shared_ptr < const OctreePointCloud < PointT, LeafT, OctreeT > > | ConstPtr |
typedef std::vector< PointT, Eigen::aligned_allocator < PointT > > | AlignedPointTVector |
typedef OctreeT::OctreeLeaf | OctreeLeaf |
Public Member Functions | |
OctreePointCloud (const double resolution_arg) | |
Octree pointcloud constructor. | |
virtual | ~OctreePointCloud () |
Empty deconstructor. | |
void | setInputCloud (const PointCloudConstPtr &cloud_arg, const IndicesConstPtr &indices_arg=IndicesConstPtr()) |
Provide a pointer to the input data set. | |
IndicesConstPtr const | getIndices () |
Get a pointer to the vector of indices used. | |
PointCloudConstPtr | getInputCloud () |
Get a pointer to the input point cloud dataset. | |
void | setEpsilon (double eps) |
Set the search epsilon precision (error bound) for nearest neighbors searches. | |
double | getEpsilon () |
Get the search epsilon precision (error bound) for nearest neighbors searches. | |
void | setResolution (double resolution_arg) |
Set/change the octree voxel resolution. | |
double | getResolution () |
Get octree voxel resolution. | |
void | addPointsFromInputCloud () |
Add points from input point cloud to octree. | |
void | addPointFromCloud (const int pointIdx_arg, IndicesPtr indices_arg) |
Add point at given index from input point cloud to octree. | |
void | addPointToCloud (const PointT &point_arg, PointCloudPtr cloud_arg) |
Add point simultaneously to octree and input point cloud. | |
void | addPointToCloud (const PointT &point_arg, PointCloudPtr cloud_arg, IndicesPtr indices_arg) |
Add point simultaneously to octree and input point cloud. | |
bool | isVoxelOccupiedAtPoint (const PointT &point_arg) const |
Check if voxel at given point exist. | |
void | deleteTree () |
Delete the octree structure and its leaf nodes. | |
bool | isVoxelOccupiedAtPoint (const double pointX_arg, const double pointY_arg, const double pointZ_arg) const |
Check if voxel at given point coordinates exist. | |
bool | isVoxelOccupiedAtPoint (const int &pointIdx_arg) const |
Check if voxel at given point from input cloud exist. | |
int | getOccupiedVoxelCenters (AlignedPointTVector &voxelCenterList_arg) const |
Get a PointT vector of centers of all occupied voxels. | |
void | deleteVoxelAtPoint (const PointT &point_arg) |
Delete leaf node / voxel at given point. | |
void | deleteVoxelAtPoint (const int &pointIdx_arg) |
Delete leaf node / voxel at given point from input cloud. | |
void | defineBoundingBox () |
Investigate dimensions of pointcloud data set and define corresponding bounding box for octree. | |
void | defineBoundingBox (const double minX_arg, const double minY_arg, const double minZ_arg, const double maxX_arg, const double maxY_arg, const double maxZ_arg) |
Define bounding box for octree. | |
void | defineBoundingBox (const double maxX_arg, const double maxY_arg, const double maxZ_arg) |
Define bounding box for octree. | |
void | defineBoundingBox (const double cubeLen_arg) |
Define bounding box cube for octree. | |
void | getBoundingBox (double &minX_arg, double &minY_arg, double &minZ_arg, double &maxX_arg, double &maxY_arg, double &maxZ_arg) const |
Get bounding box for octree. | |
double | getVoxelSquaredDiameter (unsigned int treeDepth_arg) const |
Calculates the squared diameter of a voxel at given tree depth. | |
double | getVoxelSquaredDiameter () const |
Calculates the squared diameter of a voxel at leaf depth. | |
double | getVoxelSquaredSideLen (unsigned int treeDepth_arg) const |
Calculates the squared voxel cube side length at given tree depth. | |
double | getVoxelSquaredSideLen () const |
Calculates the squared voxel cube side length at leaf level. |
Octree pointcloud class
typedef std::vector<PointT, Eigen::aligned_allocator<PointT> > pcl::octree::OctreePointCloud::AlignedPointTVector |
Reimplemented in pcl::octree::OctreePointCloudSearch.
Definition at line 108 of file octree_pointcloud.h.
typedef boost::shared_ptr<const OctreePointCloud<PointT, LeafT, OctreeT> > pcl::octree::OctreePointCloud::ConstPtr |
Reimplemented in pcl::octree::OctreePointCloudSearch.
Definition at line 105 of file octree_pointcloud.h.
typedef OctreePointCloud<PointT, LeafT, Octree2BufBase<int, LeafT> > pcl::octree::OctreePointCloud::DoubleBuffer |
Reimplemented in pcl::octree::OctreePointCloudDensity, pcl::octree::OctreePointCloudSearch, pcl::octree::OctreePointCloudOccupancy, pcl::octree::OctreePointCloudPointVector, pcl::octree::OctreePointCloudSinglePoint, and pcl::octree::OctreePointCloudVoxelCentroid.
Definition at line 100 of file octree_pointcloud.h.
typedef boost::shared_ptr<const std::vector<int> > pcl::octree::OctreePointCloud::IndicesConstPtr |
Reimplemented in pcl::octree::OctreePointCloudSearch.
Definition at line 92 of file octree_pointcloud.h.
typedef boost::shared_ptr<std::vector<int> > pcl::octree::OctreePointCloud::IndicesPtr |
Reimplemented in pcl::octree::OctreePointCloudSearch.
Definition at line 91 of file octree_pointcloud.h.
typedef OctreePointCloud<PointT, LeafT, OctreeLowMemBase<int, LeafT> > pcl::octree::OctreePointCloud::LowMem |
Reimplemented in pcl::octree::OctreePointCloudSearch.
Definition at line 101 of file octree_pointcloud.h.
typedef OctreeT::OctreeLeaf pcl::octree::OctreePointCloud::OctreeLeaf |
Reimplemented in pcl::octree::OctreePointCloudSearch, and pcl::octree::PointCloudCompression.
Definition at line 346 of file octree_pointcloud.h.
typedef pcl::PointCloud<PointT> pcl::octree::OctreePointCloud::PointCloud |
Reimplemented in pcl::octree::PointCloudCompression, pcl::octree::OctreePointCloudOccupancy, and pcl::octree::OctreePointCloudSearch.
Definition at line 94 of file octree_pointcloud.h.
typedef boost::shared_ptr<const PointCloud> pcl::octree::OctreePointCloud::PointCloudConstPtr |
Reimplemented in pcl::octree::PointCloudCompression, pcl::octree::OctreePointCloudOccupancy, and pcl::octree::OctreePointCloudSearch.
Definition at line 96 of file octree_pointcloud.h.
typedef boost::shared_ptr<PointCloud> pcl::octree::OctreePointCloud::PointCloudPtr |
Reimplemented in pcl::octree::PointCloudCompression, pcl::octree::OctreePointCloudOccupancy, and pcl::octree::OctreePointCloudSearch.
Definition at line 95 of file octree_pointcloud.h.
typedef boost::shared_ptr<OctreePointCloud<PointT, LeafT, OctreeT> > pcl::octree::OctreePointCloud::Ptr |
Reimplemented in pcl::octree::OctreePointCloudSearch.
Definition at line 104 of file octree_pointcloud.h.
typedef OctreePointCloud<PointT, LeafT, OctreeBase<int, LeafT> > pcl::octree::OctreePointCloud::SingleBuffer |
Reimplemented in pcl::octree::OctreePointCloudDensity, pcl::octree::OctreePointCloudSearch, pcl::octree::OctreePointCloudOccupancy, pcl::octree::OctreePointCloudPointVector, pcl::octree::OctreePointCloudSinglePoint, and pcl::octree::OctreePointCloudVoxelCentroid.
Definition at line 99 of file octree_pointcloud.h.
pcl::octree::OctreePointCloud::OctreePointCloud | ( | const double | resolution_arg | ) |
Octree pointcloud constructor.
resolution_arg,: | octree resolution at lowest octree level |
Definition at line 56 of file octree_pointcloud.hpp.
pcl::octree::OctreePointCloud::~OctreePointCloud | ( | ) | [virtual] |
Empty deconstructor.
Definition at line 66 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::addPointFromCloud | ( | const int | pointIdx_arg, |
IndicesPtr | indices_arg | ||
) |
Add point at given index from input point cloud to octree.
Index will be also added to indices vector.
pointIdx_arg | index of point to be added |
indices_arg | pointer to indices vector of the dataset (given by setInputCloud) |
Definition at line 114 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::addPointsFromInputCloud | ( | ) |
Add points from input point cloud to octree.
Definition at line 74 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::addPointToCloud | ( | const PointT & | point_arg, |
PointCloudPtr | cloud_arg | ||
) |
Add point simultaneously to octree and input point cloud.
point_arg | point to be added |
cloud_arg | pointer to input point cloud dataset (given by setInputCloud) |
Definition at line 129 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::addPointToCloud | ( | const PointT & | point_arg, |
PointCloudPtr | cloud_arg, | ||
IndicesPtr | indices_arg | ||
) |
Add point simultaneously to octree and input point cloud.
A corresponding index will be added to the indices vector.
point_arg | point to be added |
cloud_arg | pointer to input point cloud dataset (given by setInputCloud) |
indices_arg | pointer to indices vector of the dataset (given by setInputCloud) |
Definition at line 141 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::defineBoundingBox | ( | ) |
Investigate dimensions of pointcloud data set and define corresponding bounding box for octree.
Definition at line 244 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::defineBoundingBox | ( | const double | minX_arg, |
const double | minY_arg, | ||
const double | minZ_arg, | ||
const double | maxX_arg, | ||
const double | maxY_arg, | ||
const double | maxZ_arg | ||
) |
Define bounding box for octree.
minX_arg | X coordinate of lower bounding box corner |
minY_arg | Y coordinate of lower bounding box corner |
minZ_arg | Z coordinate of lower bounding box corner |
maxX_arg | X coordinate of upper bounding box corner |
maxY_arg | Y coordinate of upper bounding box corner |
maxZ_arg | Z coordinate of upper bounding box corner |
Definition at line 281 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::defineBoundingBox | ( | const double | maxX_arg, |
const double | maxY_arg, | ||
const double | maxZ_arg | ||
) |
Define bounding box for octree.
maxX_arg | X coordinate of upper bounding box corner |
maxY_arg | Y coordinate of upper bounding box corner |
maxZ_arg | Z coordinate of upper bounding box corner |
Definition at line 320 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::defineBoundingBox | ( | const double | cubeLen_arg | ) |
Define bounding box cube for octree.
cubeLen_arg | side length of bounding box cube. |
Definition at line 358 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::deleteTree | ( | ) | [inline] |
Delete the octree structure and its leaf nodes.
Definition at line 215 of file octree_pointcloud.h.
void pcl::octree::OctreePointCloud::deleteVoxelAtPoint | ( | const PointT & | point_arg | ) |
Delete leaf node / voxel at given point.
point_arg | point addressing the voxel to be deleted. |
Definition at line 201 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::deleteVoxelAtPoint | ( | const int & | pointIdx_arg | ) |
Delete leaf node / voxel at given point from input cloud.
pointIdx_arg | index of point addressing the voxel to be deleted. |
Definition at line 214 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::getBoundingBox | ( | double & | minX_arg, |
double & | minY_arg, | ||
double & | minZ_arg, | ||
double & | maxX_arg, | ||
double & | maxY_arg, | ||
double & | maxZ_arg | ||
) | const |
Get bounding box for octree.
minX_arg | X coordinate of lower bounding box corner |
minY_arg | Y coordinate of lower bounding box corner |
minZ_arg | Z coordinate of lower bounding box corner |
maxX_arg | X coordinate of upper bounding box corner |
maxY_arg | Y coordinate of upper bounding box corner |
maxZ_arg | Z coordinate of upper bounding box corner |
Definition at line 393 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud::getEpsilon | ( | ) | [inline] |
Get the search epsilon precision (error bound) for nearest neighbors searches.
Definition at line 155 of file octree_pointcloud.h.
IndicesConstPtr const pcl::octree::OctreePointCloud::getIndices | ( | ) | [inline] |
Get a pointer to the vector of indices used.
Definition at line 130 of file octree_pointcloud.h.
PointCloudConstPtr pcl::octree::OctreePointCloud::getInputCloud | ( | ) | [inline] |
Get a pointer to the input point cloud dataset.
Definition at line 139 of file octree_pointcloud.h.
int pcl::octree::OctreePointCloud::getOccupiedVoxelCenters | ( | AlignedPointTVector & | voxelCenterList_arg | ) | const |
Get a PointT vector of centers of all occupied voxels.
voxelCenterList_arg | results are written to this vector of PointT elements |
Definition at line 227 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud::getResolution | ( | ) | [inline] |
Get octree voxel resolution.
Definition at line 175 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud::getVoxelSquaredDiameter | ( | unsigned int | treeDepth_arg | ) | const |
Calculates the squared diameter of a voxel at given tree depth.
treeDepth_arg | depth/level in octree |
Definition at line 743 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud::getVoxelSquaredDiameter | ( | ) | const [inline] |
Calculates the squared diameter of a voxel at leaf depth.
Definition at line 325 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud::getVoxelSquaredSideLen | ( | unsigned int | treeDepth_arg | ) | const |
Calculates the squared voxel cube side length at given tree depth.
treeDepth_arg | depth/level in octree |
Definition at line 727 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud::getVoxelSquaredSideLen | ( | ) | const [inline] |
Calculates the squared voxel cube side length at leaf level.
Definition at line 341 of file octree_pointcloud.h.
bool pcl::octree::OctreePointCloud::isVoxelOccupiedAtPoint | ( | const PointT & | point_arg | ) | const |
Check if voxel at given point exist.
point_arg | point to be checked |
Definition at line 157 of file octree_pointcloud.hpp.
bool pcl::octree::OctreePointCloud::isVoxelOccupiedAtPoint | ( | const double | pointX_arg, |
const double | pointY_arg, | ||
const double | pointZ_arg | ||
) | const |
Check if voxel at given point coordinates exist.
pointX_arg | X coordinate of point to be checked |
pointY_arg | Y coordinate of point to be checked |
pointZ_arg | Z coordinate of point to be checked |
Definition at line 186 of file octree_pointcloud.hpp.
bool pcl::octree::OctreePointCloud::isVoxelOccupiedAtPoint | ( | const int & | pointIdx_arg | ) | const |
Check if voxel at given point from input cloud exist.
pointIdx_arg | point to be checked |
Definition at line 172 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud::setEpsilon | ( | double | eps | ) | [inline] |
Set the search epsilon precision (error bound) for nearest neighbors searches.
eps | precision (error bound) for nearest neighbors searches |
Definition at line 148 of file octree_pointcloud.h.
void pcl::octree::OctreePointCloud::setInputCloud | ( | const PointCloudConstPtr & | cloud_arg, |
const IndicesConstPtr & | indices_arg = IndicesConstPtr () |
||
) | [inline] |
Provide a pointer to the input data set.
cloud_arg | the const boost shared pointer to a PointCloud message |
indices_arg | the point indices subset that is to be used from cloud - if 0 the whole point cloud is used |
Definition at line 115 of file octree_pointcloud.h.
void pcl::octree::OctreePointCloud::setResolution | ( | double | resolution_arg | ) | [inline] |
Set/change the octree voxel resolution.
resolution_arg | side length of voxels at lowest tree level |
Definition at line 164 of file octree_pointcloud.h.