12 const double &voxelSize,
13 const size_t &minPointsPerVoxel)
14 : m_voxelSize(voxelSize),
15 m_minPointsPerVoxel(minPointsPerVoxel),
16 m_numPoints(pointBuffer->numPoints()),
17 m_pointBuffer(pointBuffer)
19 size_t n = pointBuffer->numPoints();
21 for (
int i = 0; i < n; i++)
32 #pragma omp parallel // allows "pragma omp task" 33 #pragma omp single // only execute every task once 41 const double &voxelSize,
46 for (
int i = 0; i < n0; i++)
53 #pragma omp parallel // allows "pragma omp task" 54 #pragma omp single // only execute every task once 55 createOctree<Vector3f>(points, n0,
m_flags, boundingBox.
min(), boundingBox.
max(), 0);
60 std::vector<size_t> reducedIndices;
65 reducedIndices.push_back(i);
const Vector3< T > & max() const
Returns the "upper right" Corner of the Bounding Box, as in the largest x, y, z of the Point Cloud...
PointBufferPtr getReducedPoints()
OctreeReduction(PointBufferPtr &pointBuffer, const double &voxelSize, const size_t &minPointsPerVoxel)
std::shared_ptr< PointBuffer > PointBufferPtr
Eigen::Vector3f Vector3f
Eigen 3D vector, single precision.
PointBufferPtr m_pointBuffer
PointBufferPtr subSamplePointBuffer(PointBufferPtr src, const size_t &n)
Computes a random sub-sampling of a point buffer by creating a uniform distribution over all point in...
boost::optional< Channel< T > > Optional
size_t m_minPointsPerVoxel
void createOctree(T *points, const int &n, bool *flagged, const T &min, const T &max, const int &level)
const Vector3< T > & min() const
Returns the "lower left" Corner of the Bounding Box, as in the smallest x, y, z of the Point Cloud...
A struct to calculate the Axis Aligned Bounding Box and Average Point of a Point Cloud.