Octree pointcloud class More...
#include <pcl/octree/octree_pointcloud.h>
Classes | |
class | prioBranchQueueEntry |
Priority queue entry for branch nodes More... | |
class | prioPointQueueEntry |
Priority queue entry for point candidates More... | |
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 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. | |
bool | voxelSearch (const PointT &point_arg, std::vector< int > &pointIdx_data_arg) |
Search for neighbors within a voxel at given point. | |
bool | voxelSearch (const int index_arg, std::vector< int > &pointIdx_data_arg) |
Search for neighbors within a voxel at given point referenced by a point index. | |
int | nearestKSearch (const PointCloudConstPtr &cloud_arg, int index_arg, int k_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg) |
Search for k-nearest neighbors at the query point. | |
int | nearestKSearch (const PointT &p_q_arg, int k_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg) |
Search for k-nearest neighbors at given query point. | |
int | nearestKSearch (int index_arg, int k_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg) |
Search for k-nearest neighbors at query point. | |
void | approxNearestSearch (const PointCloudConstPtr &cloud_arg, int query_index_arg, int &result_index_arg, float &sqr_distance_arg) |
Search for approx. | |
void | approxNearestSearch (const PointT &p_q_arg, int &result_index_arg, float &sqr_distance_arg) |
Search for approx. | |
void | approxNearestSearch (int query_index_arg, int &result_index_arg, float &sqr_distance_arg) |
Search for approx. | |
int | radiusSearch (const PointCloudConstPtr &cloud_arg, int index_arg, double radius_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg, int max_nn_arg=INT_MAX) |
Search for all neighbors of query point that are within a given radius. | |
int | radiusSearch (const PointT &p_q_arg, const double radius_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg, int max_nn_arg=INT_MAX) const |
Search for all neighbors of query point that are within a given radius. | |
int | radiusSearch (int index_arg, const double radius_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg, int max_nn_arg=INT_MAX) const |
Search for all neighbors of query point that are within a given radius. | |
int | getOccupiedVoxelCenters (std::vector< PointT, Eigen::aligned_allocator< PointT > > &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. | |
Protected Types | |
typedef OctreeT::OctreeKey | OctreeKey |
typedef OctreeT::OctreeBranch | OctreeBranch |
Protected Member Functions | |
void | addPointIdx (const int pointIdx_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. | |
LeafT * | findLeafAtPoint (const PointT &point_arg) const |
Find octree leaf node at a given point. | |
void | getKeyBitSize () |
Define octree key setting and octree depth based on defined bounding box. | |
void | adoptBoundingBoxToPoint (const PointT &pointIdx_arg) |
Grow the bounding box/octree until point fits. | |
void | genOctreeKeyforPoint (const PointT &point_arg, OctreeKey &key_arg) const |
Generate octree key for voxel at a given point. | |
void | genOctreeKeyforPoint (const double pointX_arg, const double pointY_arg, const double pointZ_arg, OctreeKey &key_arg) const |
Generate octree key for voxel at a given point. | |
virtual bool | genOctreeKeyForDataT (const int &data_arg, OctreeKey &key_arg) const |
Virtual method for generating octree key for a given point index. | |
void | genLeafNodeCenterFromOctreeKey (const OctreeKey &key_arg, PointT &point_arg) const |
Generate a point at center of leaf node voxel. | |
void | genVoxelCenterFromOctreeKey (const OctreeKey &key_arg, unsigned int treeDepth_arg, PointT &point_arg) const |
Generate a point at center of octree voxel at given tree level. | |
double | pointSquaredDist (const PointT &pointA_arg, const PointT &pointB_arg) const |
Helper function to calculate the squared distance between two points. | |
void | getNeighborsWithinRadiusRecursive (const PointT &point_arg, const double radiusSquared_arg, const OctreeBranch *node_arg, const OctreeKey &key_arg, unsigned int treeDepth_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg, int max_nn_arg) const |
Recursive search method that explores the octree and finds neighbors within a given radius. | |
double | getKNearestNeighborRecursive (const PointT &point_arg, unsigned int K_arg, const OctreeBranch *node_arg, const OctreeKey &key_arg, unsigned int treeDepth_arg, const double squaredSearchRadius_arg, std::vector< prioPointQueueEntry > &pointCandidates_arg) const |
Recursive search method that explores the octree and finds the K nearest neighbors. | |
void | approxNearestSearchRecursive (const PointT &point_arg, const OctreeBranch *node_arg, const OctreeKey &key_arg, unsigned int treeDepth_arg, int &result_index_arg, float &sqr_distance_arg) |
Recursive search method that explores the octree and finds the approximate nearest neighbor. | |
int | getOccupiedVoxelCentersRecursive (const OctreeBranch *node_arg, const OctreeKey &key_arg, std::vector< PointT, Eigen::aligned_allocator< PointT > > &voxelCenterList_arg) const |
Recursively search the tree for all leaf nodes and return a vector of voxel centers. | |
Protected Attributes | |
PointCloudConstPtr | input_ |
Pointer to input point cloud dataset. | |
IndicesConstPtr | indices_ |
A pointer to the vector of point indices to use. | |
double | epsilon_ |
Epsilon precision (error bound) for nearest neighbors searches. | |
double | resolution_ |
Octree resolution. | |
double | minX_ |
double | maxX_ |
double | minY_ |
double | maxY_ |
double | minZ_ |
double | maxZ_ |
unsigned int | maxKeys_ |
Maximum amount of keys available in octree. | |
bool | boundingBoxDefined_ |
Flag indicating if octree has defined bounding box. |
Octree pointcloud class
Definition at line 60 of file octree_pointcloud.h.
typedef boost::shared_ptr<const OctreePointCloud<PointT, LeafT, OctreeT> > pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::ConstPtr |
Definition at line 73 of file octree_pointcloud.h.
typedef OctreePointCloud<PointT, LeafT, Octree2BufBase<int, LeafT> > pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::DoubleBuffer |
Reimplemented in pcl::octree::OctreePointCloudDensity< PointT, LeafT, OctreeT >, pcl::octree::OctreePointCloudOccupancy< PointT, LeafT, OctreeT >, pcl::octree::OctreePointCloudPointVector< PointT, LeafT, OctreeT >, pcl::octree::OctreePointCloudSinglePoint< PointT, LeafT, OctreeT >, and pcl::octree::OctreePointCloudVoxelCentroid< PointT, LeafT, OctreeT >.
Definition at line 66 of file octree_pointcloud.h.
typedef boost::shared_ptr<const std::vector<int> > pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::IndicesConstPtr |
Definition at line 58 of file octree_pointcloud.h.
typedef boost::shared_ptr<std::vector<int> > pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::IndicesPtr |
Definition at line 57 of file octree_pointcloud.h.
typedef OctreePointCloud<PointT, LeafT, OctreeLowMemBase<int, LeafT> > pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::LowMem |
Definition at line 67 of file octree_pointcloud.h.
typedef OctreeT::OctreeBranch pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::OctreeBranch [protected] |
Definition at line 462 of file octree_pointcloud.h.
typedef OctreeT::OctreeKey pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::OctreeKey [protected] |
Reimplemented in pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >.
Definition at line 461 of file octree_pointcloud.h.
typedef OctreeT::OctreeLeaf pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::OctreeLeaf |
Reimplemented in pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >.
Definition at line 433 of file octree_pointcloud.h.
typedef pcl::PointCloud<PointT> pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::PointCloud |
Reimplemented in pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >.
Definition at line 60 of file octree_pointcloud.h.
typedef boost::shared_ptr<const PointCloud> pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::PointCloudConstPtr |
Reimplemented in pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >.
Definition at line 62 of file octree_pointcloud.h.
typedef boost::shared_ptr<PointCloud> pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::PointCloudPtr |
Reimplemented in pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >.
Definition at line 61 of file octree_pointcloud.h.
typedef boost::shared_ptr<OctreePointCloud<PointT, LeafT, OctreeT> > pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::Ptr |
Definition at line 72 of file octree_pointcloud.h.
typedef OctreePointCloud<PointT, LeafT, OctreeBase<int, LeafT> > pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::SingleBuffer |
Reimplemented in pcl::octree::OctreePointCloudDensity< PointT, LeafT, OctreeT >, pcl::octree::OctreePointCloudOccupancy< PointT, LeafT, OctreeT >, pcl::octree::OctreePointCloudPointVector< PointT, LeafT, OctreeT >, pcl::octree::OctreePointCloudSinglePoint< PointT, LeafT, OctreeT >, and pcl::octree::OctreePointCloudVoxelCentroid< PointT, LeafT, OctreeT >.
Definition at line 65 of file octree_pointcloud.h.
pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::OctreePointCloud | ( | const double | resolution_arg | ) |
Octree pointcloud constructor.
resolution_arg,: | octree resolution at lowest octree level |
Definition at line 54 of file octree_pointcloud.hpp.
pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::~OctreePointCloud | ( | ) | [virtual] |
Empty deconstructor.
Definition at line 64 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 112 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::addPointIdx | ( | const int | pointIdx_arg | ) | [protected] |
Add point at index from input pointcloud dataset to octree.
pointIdx_arg | the index representing the point in the dataset given by setInputCloud to be added |
Definition at line 696 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::addPointsFromInputCloud | ( | ) |
Add points from input point cloud to octree.
Definition at line 72 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 127 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 139 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::adoptBoundingBoxToPoint | ( | const PointT & | pointIdx_arg | ) | [protected] |
Grow the bounding box/octree until point fits.
pointIdx_arg | point that should be within bounding box; |
Definition at line 594 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::approxNearestSearch | ( | const PointCloudConstPtr & | cloud_arg, | |
int | query_index_arg, | |||
int & | result_index_arg, | |||
float & | sqr_distance_arg | |||
) |
Search for approx.
nearest neighbor at the query point.
cloud_arg | the point cloud data | |
query_index_arg | the index in cloud representing the query point | |
result_index_arg | the resultant index of the neighbor point | |
sqr_distance_arg | the resultant squared distance to the neighboring point |
Definition at line 328 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::approxNearestSearch | ( | const PointT & | p_q_arg, | |
int & | result_index_arg, | |||
float & | sqr_distance_arg | |||
) |
Search for approx.
nearest neighbor at the query point.
p_q_arg | the given query point | |
result_index_arg | the resultant index of the neighbor point | |
sqr_distance_arg | the resultant squared distance to the neighboring point |
Definition at line 341 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::approxNearestSearch | ( | int | query_index_arg, | |
int & | result_index_arg, | |||
float & | sqr_distance_arg | |||
) |
Search for approx.
nearest neighbor at the query point.
query_index_arg | index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector. | |
result_index_arg | the resultant index of the neighbor point | |
sqr_distance_arg | the resultant squared distance to the neighboring point |
Definition at line 356 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::approxNearestSearchRecursive | ( | const PointT & | point_arg, | |
const OctreeBranch * | node_arg, | |||
const OctreeKey & | key_arg, | |||
unsigned int | treeDepth_arg, | |||
int & | result_index_arg, | |||
float & | sqr_distance_arg | |||
) | [protected] |
Recursive search method that explores the octree and finds the approximate nearest neighbor.
point_arg | query point | |
node_arg | current octree node to be explored | |
key_arg | octree key addressing a leaf node. | |
treeDepth_arg | current depth/level in the octree | |
result_index_arg | result index is written to this reference | |
sqr_distance_arg | squared distance to search |
Definition at line 1157 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::defineBoundingBox | ( | const double | cubeLen_arg | ) |
Define bounding box cube for octree.
cubeLen_arg | side length of bounding box cube. |
Definition at line 544 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 506 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::defineBoundingBox | ( | ) |
Investigate dimensions of pointcloud data set and define corresponding bounding box for octree.
Definition at line 430 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 467 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::deleteTree | ( | ) | [inline] |
Delete the octree structure and its leaf nodes.
Definition at line 180 of file octree_pointcloud.h.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 246 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::deleteVoxelAtPoint | ( | const PointT & | point_arg | ) |
Delete leaf node / voxel at given point.
point_arg | point addressing the voxel to be deleted. |
Definition at line 233 of file octree_pointcloud.hpp.
LeafT * pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::findLeafAtPoint | ( | const PointT & | point_arg | ) | const [protected] |
Find octree leaf node at a given point.
point_arg | query point |
Definition at line 738 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::genLeafNodeCenterFromOctreeKey | ( | const OctreeKey & | key_arg, | |
PointT & | point_arg | |||
) | const [protected] |
Generate a point at center of leaf node voxel.
key_arg | octree key addressing a leaf node. | |
point_arg | write leaf node voxel center to this point reference |
Definition at line 862 of file octree_pointcloud.hpp.
bool pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::genOctreeKeyForDataT | ( | const int & | data_arg, | |
OctreeKey & | key_arg | |||
) | const [protected, virtual] |
Virtual method for generating octree key for a given point index.
data_arg | index value representing a point in the dataset given by setInputCloud | |
key_arg | write octree key to this reference |
Definition at line 847 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::genOctreeKeyforPoint | ( | const PointT & | point_arg, | |
OctreeKey & | key_arg | |||
) | const [protected] |
Generate octree key for voxel at a given point.
point_arg | the point addressing a voxel | |
key_arg | write octree key to this reference |
Definition at line 818 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::genOctreeKeyforPoint | ( | const double | pointX_arg, | |
const double | pointY_arg, | |||
const double | pointZ_arg, | |||
OctreeKey & | key_arg | |||
) | const [protected] |
Generate octree key for voxel at a given point.
pointX_arg | X coordinate of point addressing a voxel | |
pointY_arg | Y coordinate of point addressing a voxel | |
pointZ_arg | Z coordinate of point addressing a voxel | |
key_arg | write octree key to this reference |
Definition at line 831 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::genVoxelCenterFromOctreeKey | ( | const OctreeKey & | key_arg, | |
unsigned int | treeDepth_arg, | |||
PointT & | point_arg | |||
) | const [protected] |
Generate a point at center of octree voxel at given tree level.
key_arg | octree key addressing an octree node. | |
treeDepth_arg | octree depth of query voxel | |
point_arg | write leaf node center point to this reference |
Definition at line 875 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 579 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getEpsilon | ( | ) | [inline] |
Get the search epsilon precision (error bound) for nearest neighbors searches.
Definition at line 120 of file octree_pointcloud.h.
IndicesConstPtr const pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getIndices | ( | ) | [inline] |
Get a pointer to the vector of indices used.
Definition at line 95 of file octree_pointcloud.h.
PointCloudConstPtr pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getInputCloud | ( | ) | [inline] |
Get a pointer to the input point cloud dataset.
Definition at line 104 of file octree_pointcloud.h.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getKeyBitSize | ( | ) | [protected] |
Define octree key setting and octree depth based on defined bounding box.
Definition at line 751 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getKNearestNeighborRecursive | ( | const PointT & | point_arg, | |
unsigned int | K_arg, | |||
const OctreeBranch * | node_arg, | |||
const OctreeKey & | key_arg, | |||
unsigned int | treeDepth_arg, | |||
const double | squaredSearchRadius_arg, | |||
std::vector< prioPointQueueEntry > & | pointCandidates_arg | |||
) | const [protected] |
Recursive search method that explores the octree and finds the K nearest neighbors.
point_arg | query point | |
K_arg | amount of nearest neighbors to be found | |
node_arg | current octree node to be explored | |
key_arg | octree key addressing a leaf node. | |
treeDepth_arg | current depth/level in the octree | |
squaredSearchRadius_arg | squared search radius distance | |
pointCandidates_arg | priority queue of nearest neigbor point candidates |
Definition at line 934 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getNeighborsWithinRadiusRecursive | ( | const PointT & | point_arg, | |
const double | radiusSquared_arg, | |||
const OctreeBranch * | node_arg, | |||
const OctreeKey & | key_arg, | |||
unsigned int | treeDepth_arg, | |||
std::vector< int > & | k_indices_arg, | |||
std::vector< float > & | k_sqr_distances_arg, | |||
int | max_nn_arg | |||
) | const [protected] |
Recursive search method that explores the octree and finds neighbors within a given radius.
point_arg | query point | |
radiusSquared_arg | squared search radius | |
node_arg | current octree node to be explored | |
key_arg | octree key addressing a leaf node. | |
treeDepth_arg | current depth/level in the octree | |
k_indices_arg | vector of indices found to be neighbors of query point | |
k_sqr_distances_arg | squared distances of neighbors to query point | |
max_nn_arg | maximum of neighbors to be found |
Definition at line 1060 of file octree_pointcloud.hpp.
int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getOccupiedVoxelCenters | ( | std::vector< PointT, Eigen::aligned_allocator< PointT > > & | 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 415 of file octree_pointcloud.hpp.
int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getOccupiedVoxelCentersRecursive | ( | const OctreeBranch * | node_arg, | |
const OctreeKey & | key_arg, | |||
std::vector< PointT, Eigen::aligned_allocator< PointT > > & | voxelCenterList_arg | |||
) | const [protected] |
Recursively search the tree for all leaf nodes and return a vector of voxel centers.
node_arg | current octree node to be explored | |
key_arg | octree key addressing a leaf node. | |
voxelCenterList_arg | results are written to this vector of PointT elements |
Definition at line 1259 of file octree_pointcloud.hpp.
const PointT & pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getPointByIndex | ( | const unsigned int | index_arg | ) | const [protected] |
Get point at index from input pointcloud dataset.
index_arg | index representing the point in the dataset given by setInputCloud |
Definition at line 718 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getResolution | ( | ) | [inline] |
Get octree voxel resolution.
Definition at line 140 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getVoxelSquaredDiameter | ( | ) | const [inline] |
Calculates the squared diameter of a voxel at leaf depth.
Definition at line 412 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 908 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::getVoxelSquaredSideLen | ( | ) | const [inline] |
Calculates the squared voxel cube side length at leaf level.
Definition at line 428 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 892 of file octree_pointcloud.hpp.
bool pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::isVoxelOccupiedAtPoint | ( | const PointT & | point_arg | ) | const |
Check if voxel at given point exist.
point_arg | point to be checked |
Definition at line 155 of file octree_pointcloud.hpp.
bool pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 184 of file octree_pointcloud.hpp.
bool pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 170 of file octree_pointcloud.hpp.
int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::nearestKSearch | ( | const PointCloudConstPtr & | cloud_arg, | |
int | index_arg, | |||
int | k_arg, | |||
std::vector< int > & | k_indices_arg, | |||
std::vector< float > & | k_sqr_distances_arg | |||
) |
Search for k-nearest neighbors at the query point.
cloud_arg | the point cloud data | |
index_arg | the index in cloud representing the query point | |
k_arg | the number of neighbors to search for | |
k_indices_arg | the resultant indices of the neighboring points (must be resized to k a priori!) | |
k_sqr_distances_arg | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Definition at line 259 of file octree_pointcloud.hpp.
int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::nearestKSearch | ( | int | index_arg, | |
int | k_arg, | |||
std::vector< int > & | k_indices_arg, | |||
std::vector< float > & | k_sqr_distances_arg | |||
) |
Search for k-nearest neighbors at query point.
index_arg | index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector. | |
k_arg | the number of neighbors to search for | |
k_indices_arg | the resultant indices of the neighboring points (must be resized to k a priori!) | |
k_sqr_distances_arg | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Definition at line 315 of file octree_pointcloud.hpp.
int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::nearestKSearch | ( | const PointT & | p_q_arg, | |
int | k_arg, | |||
std::vector< int > & | k_indices_arg, | |||
std::vector< float > & | k_sqr_distances_arg | |||
) |
Search for k-nearest neighbors at given query point.
p_q_arg | the given query point | |
k_arg | the number of neighbors to search for | |
k_indices_arg | the resultant indices of the neighboring points (must be resized to k a priori!) | |
k_sqr_distances_arg | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Definition at line 272 of file octree_pointcloud.hpp.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::pointSquaredDist | ( | const PointT & | pointA_arg, | |
const PointT & | pointB_arg | |||
) | const [protected] |
Helper function to calculate the squared distance between two points.
pointA_arg | point A | |
pointB_arg | point B |
Definition at line 917 of file octree_pointcloud.hpp.
int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::radiusSearch | ( | int | index_arg, | |
const double | radius_arg, | |||
std::vector< int > & | k_indices_arg, | |||
std::vector< float > & | k_sqr_distances_arg, | |||
int | max_nn_arg = INT_MAX | |||
) | const |
Search for all neighbors of query point that are within a given radius.
index_arg | index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector | |
radius_arg | radius of the sphere bounding all of p_q's neighbors | |
k_indices_arg | the resultant indices of the neighboring points | |
k_sqr_distances_arg | the resultant squared distances to the neighboring points | |
max_nn_arg | if given, bounds the maximum returned neighbors to this value |
Definition at line 401 of file octree_pointcloud.hpp.
int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::radiusSearch | ( | const PointCloudConstPtr & | cloud_arg, | |
int | index_arg, | |||
double | radius_arg, | |||
std::vector< int > & | k_indices_arg, | |||
std::vector< float > & | k_sqr_distances_arg, | |||
int | max_nn_arg = INT_MAX | |||
) |
Search for all neighbors of query point that are within a given radius.
cloud_arg | the point cloud data | |
index_arg | the index in cloud representing the query point | |
radius_arg | the radius of the sphere bounding all of p_q's neighbors | |
k_indices_arg | the resultant indices of the neighboring points | |
k_sqr_distances_arg | the resultant squared distances to the neighboring points | |
max_nn_arg | if given, bounds the maximum returned neighbors to this value |
Definition at line 367 of file octree_pointcloud.hpp.
int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::radiusSearch | ( | const PointT & | p_q_arg, | |
const double | radius_arg, | |||
std::vector< int > & | k_indices_arg, | |||
std::vector< float > & | k_sqr_distances_arg, | |||
int | max_nn_arg = INT_MAX | |||
) | const |
Search for all neighbors of query point that are within a given radius.
p_q_arg | the given query point | |
radius_arg | the radius of the sphere bounding all of p_q's neighbors | |
k_indices_arg | the resultant indices of the neighboring points | |
k_sqr_distances_arg | the resultant squared distances to the neighboring points | |
max_nn_arg | if given, bounds the maximum returned neighbors to this value |
Definition at line 380 of file octree_pointcloud.hpp.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 113 of file octree_pointcloud.h.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::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 80 of file octree_pointcloud.h.
void pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::setResolution | ( | double | resolution_arg | ) | [inline] |
Set/change the octree voxel resolution.
resolution_arg | side length of voxels at lowest tree level |
Definition at line 129 of file octree_pointcloud.h.
bool pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::voxelSearch | ( | const int | index_arg, | |
std::vector< int > & | pointIdx_data_arg | |||
) |
Search for neighbors within a voxel at given point referenced by a point index.
index_arg | the index in input cloud defining the query point | |
pointIdx_data_arg | the resultant indices of the neighboring voxel points |
Definition at line 222 of file octree_pointcloud.hpp.
bool pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::voxelSearch | ( | const PointT & | point_arg, | |
std::vector< int > & | pointIdx_data_arg | |||
) |
Search for neighbors within a voxel at given point.
point_arg | point addressing a leaf node voxel | |
pointIdx_data_arg | the resultant indices of the neighboring voxel points |
Definition at line 199 of file octree_pointcloud.hpp.
bool pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::boundingBoxDefined_ [protected] |
Flag indicating if octree has defined bounding box.
Definition at line 706 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::epsilon_ [protected] |
Epsilon precision (error bound) for nearest neighbors searches.
Definition at line 687 of file octree_pointcloud.h.
IndicesConstPtr pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::indices_ [protected] |
A pointer to the vector of point indices to use.
Definition at line 684 of file octree_pointcloud.h.
PointCloudConstPtr pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::input_ [protected] |
Pointer to input point cloud dataset.
Definition at line 681 of file octree_pointcloud.h.
unsigned int pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::maxKeys_ [protected] |
Maximum amount of keys available in octree.
Definition at line 703 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::maxX_ [protected] |
Definition at line 694 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::maxY_ [protected] |
Definition at line 697 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::maxZ_ [protected] |
Definition at line 700 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::minX_ [protected] |
Definition at line 693 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::minY_ [protected] |
Definition at line 696 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::minZ_ [protected] |
Definition at line 699 of file octree_pointcloud.h.
double pcl::octree::OctreePointCloud< PointT, LeafT, OctreeT >::resolution_ [protected] |
Octree resolution.
Definition at line 690 of file octree_pointcloud.h.