Point Cloud Library (PCL)
1.11.1
|
48 template<
class T,
typename REAL =
float>
57 build (
const REAL bounds[6],
int num_of_voxels[3]);
69 getVoxel (
int x,
int y,
int z)
const;
168 #include <pcl/recognition/impl/ransac_based/voxel_structure.hpp>
void getBounds(REAL b[6]) const
Copies the bounds of the voxel structure to 'b'.
void computeVoxelCenter(const int id3[3], REAL center[3]) const
Computes the center of the voxel with given integer coordinates.
void clear()
Release the memory allocated for the voxels.
int getNumberOfVoxels() const
Returns the total number of voxels.
void compute3dId(int linear_id, int id3d[3]) const
Converts a linear id to a 3D id, i.e., computes the integer 3D coordinates of a voxel from its positi...
This class is a box in R3 built of voxels ordered in a regular rectangular grid.
const REAL * getVoxelSpacing() const
Returns the voxel spacing in x, y and z direction.
int getNeighbors(const REAL *p, T **neighs) const
Saves pointers to the voxels which are neighbors of the voxels which contains 'p'.
T * getVoxel(const REAL p[3])
Returns a pointer to the voxel which contains p or NULL if p is not inside the structure.
const T * getVoxels() const
Returns the linear voxel array.
const int * getNumberOfVoxelsXYZ() const
Returns the number of voxels in x, y and z direction.
void build(const REAL bounds[6], int num_of_voxels[3])
Call this method before using an instance of this class.
int num_of_voxels_xy_plane_
virtual ~VoxelStructure()
const float * getBounds() const
Returns the bounds of the voxel structure, which is pointer to the internal array of 6 doubles: (min_...
T * getVoxels()
Returns the linear voxel array.