LCSR-CIIS / ambf_util_slicer_plugin

some utilities for quickly converting volumes, markups from 3DSlicer into format accepted by AMBF simulator
BSD 2-Clause "Simplified" License
3 stars 3 forks source link

We should mention the required/tested 3D Slicer version #1

Closed adnanmunawar closed 1 year ago

adnanmunawar commented 1 year ago

We should specify what 3D Slicer version is required for this addon. I tried with version 4.11.20210226 and got the following error with this line Resources.slicer_helper import slicer_helper as sh. I commented it out as sh was not being used in the rest of the script. Then I got the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/adnanmunawar/Slicer-4.11.20210226-linux-amd64/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/adnanmunawar/ambf_util_slicer_plugin/AMBF_utils.py", line 14, in <module>
    import PIL.Image as Image
  File "/home/adnanmunawar/Slicer-4.11.20210226-linux-amd64/lib/Python/lib/python3.6/site-packages/PIL/Image.py", line 94, in <module>
    from . import _imaging as core
ImportError: /home/adnanmunawar/Slicer-4.11.20210226-linux-amd64/lib/Python/lib/python3.6/site-packages/PIL/_imaging.cpython-36m-x86_64-linux-gnu.so: ELF load command address/offset not properly aligned
adnanmunawar commented 1 year ago

Update. Just tested it with 3D Slicer version 5.2.1 and the plugin loads correctly.

htp2 commented 1 year ago

Yes older versions of Slicer have issues with the way they linked Python. I think > 5.0 is sufficient, but haven't checked anything but 5.2.1

htp2 commented 1 year ago

Also, separate issue but Resources.slicer_helper import slicer_helper as sh was something left over from an older version. I've removed it