How to get occupancy state of the voxel grid

Hi All,

I am using open3D library for my 3D convolution neural networks project and my first task is it create a voxel grid from a 3D point cloud data (.ply format) and to get the occupancy state of each grid. i.e. If the voxelgrid is occupied with point clouds the occupancy state should be 1 otherwise 0.

Is there any simpler method to do this using the open3D library.

Also I would like to know the command to generate just the voxelgrid

Looking forward for some help