External calling at Slicer 3D

Hi everybody,

I am programming an extension module for Slicer 3D. In one step I need to call an external command (Elastix). At this point is when I obtain the following error:

I have not been able to solve it yet. Do you know how get rid of this problem? It works when I execute the call in a terminal.

I look forward to hearing from you. Thanks in advance.

Sincerely,

Alba.

Hi Alba,

My guess is that the Slicer version of the libcrypto ends up in your PATH/LD_LIBRARY_PATH before the system library paths, and conflicts with the version expected by libgdmCommon (the elastix copy of it).

What type of extension is this, Python or C++ (CLI)?

This issue has been discussed before - see this page. The problem was what Isaiah described above (preferred library paths set up by the Slicer launcher caused loading of wrong version of some shared libraries).

I think the best would be to add a new extension to Slicer that contains Elastix. Alba, would you be interested/have time to work on this?

Hi Isaiah!

Thank you so much for the quick response!

It is a Python extension. After reading Andras referenced’s page it seems I have solved it this way:

import os
os.system(‘elastix’)
os.environ[‘ITK_AUTOLOAD_PATH’] = ‘’

I am still working with it!

Hi Andras!

Thank you so much too for the quick response!

After reading that page it seems I have solved it with this commands:

import os
os.system(‘elastix’)
os.environ[‘ITKAUTOLOAD_PATH’] = ‘’

Now my time is limited but it would be a great idea…and I guess it would help us. Maybe after I finish my final degree project I could improve it with an Elastix extension

I’ve added Elastix as an extension to Slicer - download the nightly build of Slicer tomorrow and install it from the extension manager. It includes the Elastix toolbox, so you don’t have to manually install or configure anything.

2 Likes

Thank you so much Andras for adding this extension to Sli3r. It has been really helpful! ^º^

Regards!

You’re welcome. Just a small remark: Slic3r is a very different application with a similar name. This one is 3DSlicer or just Slicer.