Failure to load RTSTRUCT dicom file

Operating system: MacOS Ventura
Slicer version: 5.7.0

Hello,
I am trying to load an image set including a 3D MRI with RT files containing volumetric and dosimetric information that have been exported from a DICOM viewer. I want to view the volume segmentations on the images in Slicer. I have installed SlicerRT, QuantitativeReporting and Sandbox extensions.

When I import the dicom files through the dicom import button, I get an error message saying that some files failed to load. the volumetric MRI appears correctly and the RT files do not load correctly. the RT files have a .dcm extension.

here is the Python error log:
AttributeError: module ‘modules’ has no attribute ‘dicomsroimportexport’
[Python] DICOM Plugin failed: module ‘modules’ has no attribute ‘dicomsroimportexport’
[Python] Warning in DICOM plugin Scalar Volume when examining loadable Unnamed Series: Reference image in series does not contain geometry information. Please use caution.
[VTK] vtkITKArchetypeImageSeriesReader::ExecuteInformation: Cannot open /Volumes/Crucial X8/SLICER/SLICER test AVM case 2/Avm_Case_02_Gp/Rm_Stereotassica_Cmc - 330253576/unnamed_0/IM-0001-10000-0001.dcm. ITK exception info: error in unknown: Could not create IO object for reading file /Volumes/Crucial X8/SLICER/SLICER test AVM case 2/Avm_Case_02_Gp/Rm_Stereotassica_Cmc - 330253576/unnamed_0/IM-0001-10000-0001.dcm
[VTK] Tried to create one of the following:
[VTK] BMPImageIO
[VTK] BioRadImageIO
[VTK] DCMTKImageIO
[VTK] GDCMImageIO
[VTK] GiplImageIO
[VTK] JPEGImageIO
[VTK] LSMImageIO
[VTK] MGHImageIO
[VTK] MINCImageIO
[VTK] MRCImageIO
[VTK] MetaImageIO
[VTK] NiftiImageIO
[VTK] NrrdImageIO
[VTK] PNGImageIO
[VTK] ScancoImageIO
[VTK] StimulateImageIO
[VTK] TIFFImageIO
[VTK] VTKImageIO
[VTK] MRMLIDImageIO
[VTK] Bruker2dseqImageIO
[VTK] GE4ImageIO
[VTK] GE5ImageIO
[VTK] HDF5ImageIO
[VTK] JPEG2000ImageIO
[VTK] You probably failed to set a file suffix, or
[VTK] set the suffix to an unsupported type.
[VTK] Algorithm vtkITKArchetypeImageSeriesVectorReaderFile (0x7fe46d86f670) returned failure for request: vtkInformation (0x600008bd2940)
[VTK] Debug: Off
[VTK] Modified Time: 630465
[VTK] Reference Count: 1
[VTK] Registered Events: (none)
[VTK] Request: REQUEST_INFORMATION
[VTK] ALGORITHM_AFTER_FORWARD: 1
[VTK] FORWARD_DIRECTION: 0
[Python] Could not read scalar volume using GDCM approach. Error is: FileFormatError
[VTK] vtkITKArchetypeImageSeriesReader::ExecuteInformation: Cannot open /Volumes/Crucial X8/SLICER/SLICER test AVM case 2/Avm_Case_02_Gp/Rm_Stereotassica_Cmc - 330253576/unnamed_0/IM-0001-10000-0001.dcm. ITK exception info: error in unknown: Could not create IO object for reading file /Volumes/Crucial X8/SLICER/SLICER test AVM case 2/Avm_Case_02_Gp/Rm_Stereotassica_Cmc - 330253576/unnamed_0/IM-0001-10000-0001.dcm
[VTK] Tried to create one of the following:
[VTK] BMPImageIO
[VTK] BioRadImageIO
[VTK] DCMTKImageIO
[VTK] GDCMImageIO
[VTK] GiplImageIO
[VTK] JPEGImageIO
[VTK] LSMImageIO
[VTK] MGHImageIO
[VTK] MINCImageIO
[VTK] MRCImageIO
[VTK] MetaImageIO
[VTK] NiftiImageIO
[VTK] NrrdImageIO
[VTK] PNGImageIO
[VTK] ScancoImageIO
[VTK] StimulateImageIO
[VTK] TIFFImageIO
[VTK] VTKImageIO
[VTK] MRMLIDImageIO
[VTK] Bruker2dseqImageIO
[VTK] GE4ImageIO
[VTK] GE5ImageIO
[VTK] HDF5ImageIO
[VTK] JPEG2000ImageIO
[VTK] You probably failed to set a file suffix, or
[VTK] set the suffix to an unsupported type.
[VTK] Algorithm vtkITKArchetypeImageSeriesVectorReaderFile (0x7fe46d9a0450) returned failure for request: vtkInformation (0x600004b85080)
[VTK] Debug: Off
[VTK] Modified Time: 630560
[VTK] Reference Count: 1
[VTK] Registered Events: (none)
[VTK] Request: REQUEST_INFORMATION
[VTK] ALGORITHM_AFTER_FORWARD: 1
[VTK] FORWARD_DIRECTION: 0
[Python] Could not read scalar volume using DCMTK approach. Error is: FileFormatError
[Python] Could not load: Unnamed Series as a Scalar Volume
[FD] [49433:149507:1222/162444.029558:ERROR:gl_context_cgl.cc(118)] Error creating context.

I tried to export the ROIs from Horos to Osirix ROI format and .xml but cannot load these either.

Could the issue lie with the file metadata (they could be corrupted when exported from the Dicom viewer)? or rather the Slicer program itself?

sidenote: the same cases have been segmented in Brainlab’s Elements software and exported, and these load correctly on Slicer.

update: after trying to load sample files with RT data unsuccessfully and reinstalling 3D SLICER (latest stable version 5.6.1 and preview release 5.7.0) with SlicerRT extension also without any better results I downloaded a previous release of 3D SLICER (5.2.2) and it works seamlessly.

the RTSTRUCT files seem to be intact and the issue might have been related to the location/path to retrieve the extensions/modules (dicomimportexport error).

PS: the latest stable Windows release, with SlicerRT did not function either.

2 Likes

Yes, unfortunately there is a problem with certain extensions on MacOS.

Thanks for posting the outcome as well.

I have the same problem on Mac. Current preview fails the same way as the preview release I had from January in this line SlicerRT/DicomSroImportExport/DicomSroImportExportPlugin.py at master ¡ SlicerRt/SlicerRT ¡ GitHub

AttributeError: module 'modules' has no attribute 'dicomrtimportexport'
[Python] DICOM Plugin failed: module 'modules' has no attribute 'dicomrtimportexport'
Traceback (most recent call last):
  File "/Applications/Slicer-5.7.0-20240306.app/Contents/lib/Slicer-5.7/qt-scripted-modules/DICOMLib/DICOMUtils.py", line 765, in getLoadablesFromFileLists
    loadablesByPlugin[plugin] = plugin.examineForImport(fileLists)
  File "/Applications/Slicer-5.7.0-20240306.app/Contents/Extensions-32750/SlicerRT/lib/Slicer-5.7/qt-scripted-modules/DicomSroImportExportPlugin.py", line 40, in examineForImport
    slicer.modules.dicomsroimportexport.logic().ExamineForLoad(vtkFileList, loadablesCollection)
AttributeError: module 'modules' has no attribute 'dicomsroimportexport'
[Python] DICOM Plugin failed: module 'modules' has no attribute 'dicomsroimportexport'

Full error log is here: SlicerRT error log - Slicer 5.7.0-2024-03-04 ¡ GitHub

The impact of this error is that it is currently impossible to load DICOM RTSTRUCT at all, so this is a major regression. I have not been able to find a workaround. I also have the same error in the current stable 5.6.1.

Is there any plan/resources to fix this?

1 Like

The errors at the top of the log point to a libomp.dylib. Is that missing from the package but available in a local build?

Qt]   Error(s):
[Qt]     Cannot load library /Applications/Slicer-5.7.0-20240306.app/Contents/Extensions-32750/SlicerRT/lib/Slicer-5.7/qt-loadable-modules/libqSlicerBeamsModule.dylib: (dlopen(/Applications/Slicer-5.7.0-20240306.app/Contents/Extensions-32750/SlicerRT/lib/Slicer-5.7/qt-loadable-modules/libqSlicerBeamsModule.dylib, 0x0085): Library not loaded: @rpath/libomp.dylib
[Qt]   Referenced from: <8CC410E5-7FE3-33F6-BC6E-A68391968FE8> /Applications/Slicer-5.7.0-20240306.app/Contents/Extensions-32750/SlicerRT/lib/Slicer-5.7/qt-loadable-modules/libvtkSlicerBeamsModuleMRML.dylib
[Qt]   Reason: tried: '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/QuantitativeReporting/lib/Slicer-5.7/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/SlicerDevelopmentToolbox/lib/Slicer-5.7/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/IDCBrowser/lib/Slicer-5.7/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/DCMQI/lib/Slicer-5.7/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/DCMQI/lib/Slicer-5.7/cli-modules/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/PETDICOMExtension/lib/Slicer-5.7/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/PETDICOMExtension/lib/Slicer-5.7/cli-modules/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/SlicerRT/lib/Slicer-5.7/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/SlicerRT/lib/Slicer-5.7/cli-modules/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../Extensions-32750/SlicerRT/lib/Slicer-5.7/qt-loadable-modules/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../bin/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../lib/Slicer-5.7/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../lib/Slicer-5.7/cli-modules/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../lib/Slicer-5.7/qt-loadable-modules/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../../lib/Slicer-5.7/qt-loadable-modules/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../lib/Python/lib/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../lib/Python/lib/python3.9/site-packages/numpy/core/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/bin/../lib/Python/lib/python3.9/site-packages/numpy/lib/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/../lib/Slicer-5.7/qt-loadable-modules/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/Users/svc-dashboard/D/Support/clang+llvm-14.0.6-x86_64-apple-darwin/lib/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/Support/clang+llvm-14.0.6-x86_64-apple-darwin/lib/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/qRestAPI-build/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/Frameworks/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/Frameworks/QtCore.framework/Versions/5/Frameworks/libomp.dylib' (no such file), '/Applications/Slicer-5.7.0-20240306.app/Contents/MacOS/../libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/CTK-build/CMakeExternals/Install/lib/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/CTK-build/CMakeExternals/Install/lib/libomp.dylib' (no such file), '/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/P/A/teem-build/bin/libomp.dylib' (no such file), '/usr/local/lib/libomp.dylib' (no such file), '/usr/lib/libomp.dylib' (no such file, not in dyld cache))
1 Like

Indeed, libomp.dylib is missing from the package. I do not have a mac build.

I created an issue in SlicerRT: SlicerRT Slicer extension is not working on mac ¡ Issue #242 ¡ SlicerRt/SlicerRT ¡ GitHub

Thank you very much for sharing this information, I couldn’t import the RTStructu on the latest versions (5.6.2 neihter 5.7 for linux)
I succeded in version 5.2.2 :))