Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Title: Failure to Instantiate MedSAMSlicer Module and System Freeze in Slicer 5.6.1 #53

Open
Alilalily opened this issue Jan 9, 2025 · 0 comments

Comments

@Alilalily
Copy link

Alilalily commented Jan 9, 2025

System Information:

  • Operating System: Windows 10
  • GPU: None
  • 3D Slicer Version: 5.6.1 and 5.6.2
  • MedSAMSlicer Version: 0.11, 0.13

Description:

I have tried using MedSAMSlicer 0.11 and 0.13 with Slicer 5.6.1and Slicer 5.6.2 on my Windows 10 system (without GPU), but I encountered multiple issues:

  1. Error when using MedSAMSlicer-0.11:
    • Upon starting the module, I receive the following error:
    [FD] WARNING: In D:\a\SimpleITK\SimpleITK\bld\ITK\Modules\Core\Common\src\itkObjectFactoryBase.cxx, line 547
    [FD] Possible incompatible factory load:
    [FD] Running itk version :
    [FD] itk version 5.4.0
    [FD] Loaded factory version:
    [FD] itk version 5.3.0
    [FD] Loading factory:
    [FD] C:/Users/user/AppData/Local/slicer.org/Slicer 5.6.1/bin/../lib/Slicer-5.6/ITKFactories\MRMLIDIOPlugin.dll
    [FD] Traceback (most recent call last):
    [FD] File "<string>", line 1, in <module>
    [FD] File "C:\Users\user\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\imp.py", line 169, in load_source
    [FD] module = _exec(spec, sys.modules[name])
    [FD] File "<frozen importlib._bootstrap>", line 613, in _exec
    [FD] File "<frozen importlib._bootstrap_external>", line 850, in exec_module
    [FD] File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
    [FD] File "D:/SoftWare/ToolSoftWare/extension for slicer/MedSAMSlicer-0.11/MedSAM/MedSAMLite/MedSAMLite.py", line 19, in <module>
    [FD] from slicer import vtkMRMLMarkupsROINode, vtkMRMLSegmentationNode
    [FD] ImportError: cannot import name 'vtkMRMLMarkupsROINode' from 'slicer' (C:\Users\user\AppData\Local\slicer.org\Slicer 5.6.1\bin\Python\slicer\__init__.py)

This prevents the MedSAMLite module from being instantiated.
2. Error when using MedSAMSlicer-0.13:

A similar error occurs with version 0.13:

[FD] WARNING: In D:\a\SimpleITK\SimpleITK\bld\ITK\Modules\Core\Common\src\itkObjectFactoryBase.cxx, line 547
[FD] Possible incompatible factory load:
[FD] Running itk version :
[FD] itk version 5.4.0
[FD] Loaded factory version:
[FD] itk version 5.3.0
[FD] Loading factory:
[FD] C:/Users/user/AppData/Local/slicer.org/Slicer 5.6.1/bin/../lib/Slicer-5.6/ITKFactories\MRMLIDIOPlugin.dll
[FD] Traceback (most recent call last):
[FD] File "<string>", line 1, in <module>
[FD] File "C:\Users\user\AppData\Local\slicer.org\Slicer 5.6.1\lib\Python\Lib\imp.py", line 169, in load_source
[FD] module = _exec(spec, sys.modules[name])
[FD] File "<frozen importlib._bootstrap>", line 613, in _exec
[FD] File "<frozen importlib._bootstrap_external>", line 850, in exec_module
[FD] File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
[FD] File "D:/SoftWare/ToolSoftWare/extension for slicer/MedSAMSlicer-0.13/MedSAMLite/MedSAMLite.py", line 19, in <module>
[FD] from slicer import vtkMRMLMarkupsROINode, vtkMRMLSegmentationNode
[FD] ImportError: cannot import name 'vtkMRMLMarkupsROINode' from 'slicer' (C:\Users\user\AppData\Local\slicer.org\Slicer 5.6.1\bin\Python\slicer\__init__.py)

This prevents the MedSAMLite module from being instantiated as well.
3. Freezing Issue When Using the Extension:

  • After ignoring the errors in the Python console and attempting to use the extension, I attached an ROI and clicked "send image" or "single segmentation".
  • A progress bar starts to show, indicating "embedding". When the first progress bar reaches 100%, a second one appears, but this one doesn't progress.
  • Eventually, Slicer becomes unresponsive and freezes.

My system configuration:

  • Windows 10
  • No GPU

Questions/Clarifications:

  • Is this issue caused by my hardware setup (lack of GPU), or is it related to software incompatibilities (Slicer version, MedSAMSlicer version, dependencies)?
  • How can I resolve the import error related to vtkMRMLMarkupsROINode? Is this class no longer available in Slicer 5.6.1?
  • What steps can I take to prevent the software from freezing during the segmentation process?
  • Steps to Reproduce:
  • Install Slicer 5.6.1 or 5.6.2(no GPU).
  • Install MedSAMSlicer 0.11 or 0.13.
  • Attempt to use the "send image" or "single segmentation" options.
  • Observe the progress bar issue and software freeze.

Additional Information:
I have tried different versions of Slicer (5.6.1 + MedSAMSlicer-0.11, 5.6.1 + MedSAMSlicer-0.13, 5.6.2 + MedSAMSlicer-0.13) but encounter the same errors.
The software freezes after completing the first progress bar in the embedding process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant