Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

add create_from_sparse_indices for VoxelGrid

Open GouMinghao opened this issue 5 months ago • 5 comments

add create_from_sparse_indices for VoxelGrid

Type

  • [ ] Bug fix (non-breaking change which fixes an issue): Fixes #
  • [x] New feature (non-breaking change which adds functionality). Resolves #
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Motivation: I need to create voxel grid given sparse 3d indices but found it is not implemented. It is implmented in this PR

Checklist:

  • [ x] I have run python util/check_style.py --apply to apply Open3D code style to my code.
  • [ ] This PR changes Open3D behavior or adds new functionality.
    • [x] Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is updated accordingly.
    • [x] I have added or updated C++ and / or Python unit tests OR included test results (e.g. screenshots or numbers) here.
  • [x] I will follow up and update the code if CI fails.
  • [x] For fork PRs, I have selected Allow edits from maintainers.

Description

add create_from_sparse_indices for VoxelGrid the result of my added python test is given in the image below 2025-08-15 23-39-13屏幕截图

GouMinghao avatar Aug 15 '25 15:08 GouMinghao

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

update-docs[bot] avatar Aug 15 '25 15:08 update-docs[bot]

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@syncle @griegler Could you please help review this pr

GouMinghao avatar Aug 16 '25 00:08 GouMinghao

Hi @GouMinghao thanks for submitting this PR! Does this function meet your needs?

CreateFromPointCloud()

https://github.com/isl-org/Open3D/pull/7327/files#diff-b9c67bc5c7b93513cdea4082d98482283a4ea17ad487a5cc60e0298d9994c15cL197-L209

You can first create a point cloud from the indices (these will be the coordinates of the point cloud) and the colors, and then use this function.

Thank you for your reply, but I believe you suggestion does the job in some indirect way and sacrifices performance

So it would be better to do it in the direct way as it is very important and common in OCC visualization

GouMinghao avatar Sep 19 '25 05:09 GouMinghao

@ssheorey Could please have a look on this pr again, thanks!

GouMinghao avatar Oct 19 '25 06:10 GouMinghao