class mola::lidar_segmentation::PointCloudToVoxelGrid

Overview

Index of points in a point cloud by their 3D position according to a predefined regular-sized voxel grid. More…

#include <PointCloudToVoxelGrid.h>

class PointCloudToVoxelGrid
{
public:
    // typedefs

    typedef mrpt::containers::CDynamicGrid3D<voxel_t, float> grid_t;

    // structs

    struct Parameters;
    struct voxel_t;

    // fields

    Parameters params_;
    grid_t pts_voxels;
    std::vector<uint32_t> used_voxel_indices;

    // methods

    void resize(
        const mrpt::math::TPoint3D& min_corner,
        const mrpt::math::TPoint3D& max_corner,
        const float voxel_size
        );

    void processPointCloud(const mrpt::maps::CPointsMap& p);
    void clear();
};

Detailed Documentation

Index of points in a point cloud by their 3D position according to a predefined regular-sized voxel grid.

Fields

grid_t pts_voxels

The point indices in each voxel. Directly access to each desired cell, use its iterator, etc.