Using open3d within Slicer

I recently joined the SlicerMorph team and I have been developing an algorithm that makes heavy use of the open3d library ( I was able to install it within Slicer using pip, but when importing it into Slicer, I get the following error (ImportError: /usr/lib/x86_64-linux-gnu/ version `GLIBCXX_3.4.22’ not found ). It seems to be related to the GNU C Library, I was wondering if there is any hope that this problem could be solved, as it would be great to be able to use open3d within Slicer. Any ideas or directions? Thanks in advance.

Hi -

The error you are seeing should be fixable at the os level - you can google around for GLIBCXX and libstdc++ and you should find the right instructions for your particular OS version.

On the plus side, I can report that I was able to run pip_install('open3d') and import open3d on both windows and mac and it appears that it will nicely interoperate with Slicer via numpy arrays.

Thanks for pointing out the library - looks super useful. Let us know if you get it working on your machine and how it works. I’ll definitely be looking into it too and maybe we can work up some demo code.

1 Like

I had a look and Open3D and I’m not impressed at all. It is a small library containing of a handful of random algorithms that are mostly already available in other widely used libraries (OpenCV, PCL, VTK, etc). What feature of Open3D do you use?

Don’t know if it’ll be useful but it does work.

m = getNode("Segment_1")
p = arrayFromModelPoints(m)
cloud = o3d.geometry.PointCloud()
cloud.points = o3d.utility.Vector3dVector(p)

1 Like

Dear Steve and Andras.
Thanks so much for the quick responses and thanks Steve to point us in the right direction to get it working. I agree with Andras that it is a small and targeted library. To answer the usage question, this library contains most of what we need for registration and some functions that I couldn’t find in other more comprehensive libraries. For example, the feature -based RANSAC registration ( method is quite useful and I haven’t found a good implementation elsewhere. Similarly, the pose graph functionality is another one that I could not find in other libraries ( that deal with point clouds. All in all, I would also say that this library is quite lightweights (seems to use the memory efficiently), it has very readable syntax and it contains useful callback functions for the visualization. I don’t necessarily expect that it would be useful for the Slicer community at large, but, for our purposes, it seems to work well. I am open to the possibility that other libraries might do a better job at it. I just don’t know another library that contains everything that I would need at this point.
Thanks again,

1 Like