Slicer v. 5.6.0. Radiomics-module error while extracting features?


Updated slicer to the latest version (5.6.0). Now I get an error while trying to extract radiomic features using the Radiomics module. See following error message. What can I do?

[2023-12-07 09:15:38] I: radiomics.script: Starting PyRadiomics (version: v3.1.0)
[2023-12-07 09:15:38] I: radiomics.script: Processing input…
[2023-12-07 09:15:38] E: radiomics.script: Error extracting features!
Traceback (most recent call last):
File “C:\Users\magnu\AppData\Local\\Slicer 5.6.0\\Extensions-32390\SlicerRadiomics\Lib\site-packages\radiomics\”, line 135, in run
results = self.processCases(caseGenerator)
File "C:\Users\magnu\AppData\Local\\Slicer 5.6.0\\Extensions-32390\SlicerRadiomics\Lib\site-packages\radiomics\scripts_init
.py", line 233, in _processCases
setting_overrides = self.parseOverrides()
File "C:\Users\magnu\AppData\Local\\Slicer 5.6.0\\Extensions-32390\SlicerRadiomics\Lib\site-packages\radiomics\scripts_init
.py", line 353, in _parseOverrides
settingsSchema = yaml.safe_load(schema)[‘mapping’][‘setting’][‘mapping’]
File “C:\Users\magnu\AppData\Local\\Slicer 5.6.0\\Extensions-32390\SlicerRadiomics\Lib\site-packages\ruamel\yaml\”, line 1105, in safe_load
error_deprecation(‘safe_load’, ‘load’, arg=“typ=‘safe’, pure=True”)
File “C:\Users\magnu\AppData\Local\\Slicer 5.6.0\\Extensions-32390\SlicerRadiomics\Lib\site-packages\ruamel\yaml\”, line 1037, in error_deprecation
raise AttributeError(s)
“safe_load()” has been removed, use

yaml = YAML(typ=‘safe’, pure=True)

instead of file “C:\Users\magnu\AppData\Local\\Slicer 5.6.0\\Extensions-32390\SlicerRadiomics\Lib\site-packages\radiomics\”, line 353

  settingsSchema = yaml.safe_load(schema)['mapping']['setting']['mapping']

Thanks for reporting - the same issue is being tracked here with a proposed change. Maybe you could test the fix?

Thank you. Good to know it might not be my fault.

However, I will have to wait for a fix, since I can’t edit any sourcecode myself (if I understood the fix correctly).

I can extract the features when not specifying the binWidth or binCount in the settings, when running pyradiomics from the command-prompt. However it returns a lot of 0 or 1 indicating problems with the binWidth, but when I try to change the size or count of the bin, it returns the above mentioned error.

If you aren’t able to apply/test the fix, you should be able to use older versions of Slicer and SlicerRadiomics.