Classes | Public Types | Public Member Functions | Protected Attributes
pcl::recognition::ORROctree Class Reference

That's a very specialized and simple octree class. That's the way it is intended to be, that's why no templates and stuff like this. More...

#include <orr_octree.h>

List of all members.

Classes

class  Node

Public Types

typedef pcl::PointCloud
< pcl::PointXYZ
PointCloudIn
typedef pcl::PointCloud
< pcl::Normal
PointCloudN
typedef pcl::PointCloud
< pcl::PointXYZ
PointCloudOut

Public Member Functions

void build (const PointCloudIn &points, float voxel_size, const PointCloudN *normals=NULL, float enlarge_bounds=0.00001f)
 Creates an octree which encloses 'points' and with leaf size equal to 'voxel_size'. 'enlarge_bounds' makes sure that no points from the input will lie on the octree boundary by enlarging the bounds by that factor. For example, enlarge_bounds = 1 means that the bounds will be enlarged by 100%. The default value is fine.
void build (const float *bounds, float voxel_size)
 Creates an empty octree with bounds at least as large as the ones provided as input and with leaf size equal to 'voxel_size'.
void clear ()
ORROctree::NodecreateLeaf (float x, float y, float z)
 Creates the leaf containing p = (x, y, z) and returns a pointer to it, however, only if p lies within the octree bounds! A more general version which allows p to be out of bounds is not implemented yet. The method returns NULL if p is not within the root bounds. If the leaf containing p already exists nothing happens and method just returns a pointer to the leaf.
void deleteBranch (Node *node)
 Deletes the branch 'node' is part of.
const float * getBounds () const
void getBounds (float b[6]) const
std::vector< ORROctree::Node * > & getFullLeaves ()
 Returns a vector with all octree leaves which contain at least one point.
const std::vector
< ORROctree::Node * > & 
getFullLeaves () const
void getFullLeavesIntersectedBySphere (const float *p, float radius, std::list< ORROctree::Node * > &out) const
 This method returns a super set of the full leavess which are intersected by the sphere with radius 'radius' and centered at 'p'. Pointers to the intersected full leaves are saved in 'out'. The method computes a super set in the sense that in general not all leaves saved in 'out' are really intersected by the sphere. The intersection test is based on the leaf radius (since its faster than checking all leaf corners and sides), so we report more leaves than we should, but still, this is a fair approximation.
void getFullLeavesPoints (PointCloudOut &out) const
ORROctree::NodegetLeaf (int i, int j, int k)
 Since the leaves are aligned in a rectilinear grid, each leaf has a unique id. The method returns the leaf with id [i, j, k] or NULL is no such leaf exists.
ORROctree::NodegetLeaf (float x, float y, float z)
 Returns a pointer to the leaf containing p = (x, y, z) or NULL if no such leaf exists.
void getNormalsOfFullLeaves (PointCloudN &out) const
ORROctree::NodegetRandomFullLeafOnSphere (const float *p, float radius) const
 Randomly chooses and returns a full leaf that is intersected by the sphere with center 'p' and 'radius'. Returns NULL if no leaf is intersected by that sphere.
ORROctree::NodegetRoot ()
float getVoxelSize () const
void insertNeighbors (Node *node)
 ORROctree ()
virtual ~ORROctree ()

Protected Attributes

float bounds_ [6]
std::vector< Node * > full_leaves_
Noderoot_
int tree_levels_
float voxel_size_

Detailed Description

That's a very specialized and simple octree class. That's the way it is intended to be, that's why no templates and stuff like this.

Author:
Chavdar Papazov

Definition at line 71 of file orr_octree.h.


Member Typedef Documentation

Definition at line 74 of file orr_octree.h.

Definition at line 76 of file orr_octree.h.

Definition at line 75 of file orr_octree.h.


Constructor & Destructor Documentation

Definition at line 51 of file orr_octree.cpp.

virtual pcl::recognition::ORROctree::~ORROctree ( ) [inline, virtual]

Definition at line 282 of file orr_octree.h.


Member Function Documentation

void pcl::recognition::ORROctree::build ( const PointCloudIn points,
float  voxel_size,
const PointCloudN normals = NULL,
float  enlarge_bounds = 0.00001f 
)

Creates an octree which encloses 'points' and with leaf size equal to 'voxel_size'. 'enlarge_bounds' makes sure that no points from the input will lie on the octree boundary by enlarging the bounds by that factor. For example, enlarge_bounds = 1 means that the bounds will be enlarged by 100%. The default value is fine.

Definition at line 116 of file orr_octree.cpp.

void pcl::recognition::ORROctree::build ( const float *  bounds,
float  voxel_size 
)

Creates an empty octree with bounds at least as large as the ones provided as input and with leaf size equal to 'voxel_size'.

Definition at line 75 of file orr_octree.cpp.

Definition at line 61 of file orr_octree.cpp.

ORROctree::Node* pcl::recognition::ORROctree::createLeaf ( float  x,
float  y,
float  z 
) [inline]

Creates the leaf containing p = (x, y, z) and returns a pointer to it, however, only if p lies within the octree bounds! A more general version which allows p to be out of bounds is not implemented yet. The method returns NULL if p is not within the root bounds. If the leaf containing p already exists nothing happens and method just returns a pointer to the leaf.

Definition at line 304 of file orr_octree.h.

Deletes the branch 'node' is part of.

Definition at line 380 of file orr_octree.cpp.

const float* pcl::recognition::ORROctree::getBounds ( ) const [inline]

Definition at line 431 of file orr_octree.h.

void pcl::recognition::ORROctree::getBounds ( float  b[6]) const [inline]

Definition at line 437 of file orr_octree.h.

Returns a vector with all octree leaves which contain at least one point.

Definition at line 416 of file orr_octree.h.

const std::vector<ORROctree::Node*>& pcl::recognition::ORROctree::getFullLeaves ( ) const [inline]

Definition at line 419 of file orr_octree.h.

void pcl::recognition::ORROctree::getFullLeavesIntersectedBySphere ( const float *  p,
float  radius,
std::list< ORROctree::Node * > &  out 
) const

This method returns a super set of the full leavess which are intersected by the sphere with radius 'radius' and centered at 'p'. Pointers to the intersected full leaves are saved in 'out'. The method computes a super set in the sense that in general not all leaves saved in 'out' are really intersected by the sphere. The intersection test is based on the leaf radius (since its faster than checking all leaf corners and sides), so we report more leaves than we should, but still, this is a fair approximation.

Definition at line 293 of file orr_octree.cpp.

Definition at line 416 of file orr_octree.cpp.

ORROctree::Node* pcl::recognition::ORROctree::getLeaf ( int  i,
int  j,
int  k 
) [inline]

Since the leaves are aligned in a rectilinear grid, each leaf has a unique id. The method returns the leaf with id [i, j, k] or NULL is no such leaf exists.

Definition at line 365 of file orr_octree.h.

ORROctree::Node* pcl::recognition::ORROctree::getLeaf ( float  x,
float  y,
float  z 
) [inline]

Returns a pointer to the leaf containing p = (x, y, z) or NULL if no such leaf exists.

Definition at line 377 of file orr_octree.h.

Definition at line 433 of file orr_octree.cpp.

ORROctree::Node * pcl::recognition::ORROctree::getRandomFullLeafOnSphere ( const float *  p,
float  radius 
) const

Randomly chooses and returns a full leaf that is intersected by the sphere with center 'p' and 'radius'. Returns NULL if no leaf is intersected by that sphere.

Definition at line 332 of file orr_octree.cpp.

Definition at line 428 of file orr_octree.h.

Definition at line 443 of file orr_octree.h.

Definition at line 446 of file orr_octree.h.


Member Data Documentation

Definition at line 484 of file orr_octree.h.

Definition at line 487 of file orr_octree.h.

Definition at line 486 of file orr_octree.h.

Definition at line 485 of file orr_octree.h.

Definition at line 484 of file orr_octree.h.


The documentation for this class was generated from the following files:


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:44:35