torchgeo icon indicating copy to clipboard operation
torchgeo copied to clipboard

Replace open3d with pyvista

Open isaaccorley opened this issue 3 years ago • 1 comments

Refactors point cloud plotting in the torchgeo.datasets.IDTReeS dataset to use pyvista instead of open3d

Note: Currently figuring out the min version which passes tests.

See #662

Example:

https://user-images.githubusercontent.com/22203655/178155777-dac2e462-d978-4005-9412-3ffd91a10bcb.mov

isaaccorley avatar Jul 10 '22 17:07 isaaccorley

Need to figure out how to get the plotting to run headless within the CI container. That seems to be what's causing tests to fail.

isaaccorley avatar Jul 10 '22 17:07 isaaccorley

Did you ever open an issue with the developers? Can you link to it here?

adamjstewart avatar Oct 01 '22 21:10 adamjstewart

A couple things:

  • I decided to setup and return the point_cloud PolyData object. Users will be able to run pyvista.plot(point_cloud, ...) themselves to render everything how they see fit. I think this is better because it doesn't assume the other parameters a user wants to define. Let me know if anyone has any objections to this.
  • I was able to remove the colormap arg entirely because pyvista.plot supports a cmap arg which effectively does the same thing. So pyvista is already helping clean up the code 👍

Thanks for the assist @banesullivan. I'm really enjoying the simplicity of working with pyvista with point cloud datasets so far!

isaaccorley avatar Dec 07 '22 23:12 isaaccorley