Class OctreeReductionBase

Inheritance Relationships

Derived Types

Class Documentation

class OctreeReductionBase

Abstract base class for all octree-based reduction algorithms.

Subclassed by lvr2::NearestCenterOctreeReduction, lvr2::RandomSampleOctreeReduction

Public Functions

OctreeReductionBase() = delete

Default constructor is not available.

inline OctreeReductionBase(PointBufferPtr pointBuffer, float voxelSize, size_t minPointsPerVoxel)

Construct a new Octree Reduction Base object.

Parameters:
  • pointBuffer – Point buffer with the initial point cloud

  • voxelSize – Voxel size of the octree

  • minPointsPerVoxel – Minimum points per voxel

virtual PointBufferPtr getReducedPoints() = 0

Get the reduced point buffer.

Protected Functions

inline OctreeReductionBase(size_t numPoints, float voxelSize, size_t minPointsPerVoxel)

Construct a new Octree Reduction Base object with an external point buffer.

Parameters:
  • numPoints – Number of points in the point buffer

  • voxelSize – Voxel size of the octree

  • minPointsPerVoxel – Minimum points per voxel

Protected Attributes

std::vector<size_t> m_pointIndices

Indices of the points that are kept after reduction.

PointBufferPtr m_pointBuffer

Point buffer.

float m_voxelSize

Voxel size.

size_t m_minPointsPerVoxel

Minimum number of points per voxel.

size_t m_numPoints

Number of points in point buffer.