AIM-Harvard / pyradiomics

Open-source python package for the extraction of Radiomics features from 2D and 3D images and binary masks. Support: https://discourse.slicer.org/c/community/radiomics
http://pyradiomics.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.11k stars 485 forks source link

SafeLoadRemove Error in Slicer #857

Closed DanXieJY closed 6 months ago

DanXieJY commented 7 months ago

I recently found the SlicerRadiomics extension does not work in 3D Slicer and below is the issue that I decribed in. https://github.com/AIM-Harvard/SlicerRadiomics/issues/80

I tried to modify the code with the help of @pieper :

  1. Add the code below to the top of the file: from ruamel.yaml import YAML
  2. Add the code below before line 353: yaml = YAML(typ='safe', pure=True)
  3. Change what was in line 353 to: settingsSchema = yaml.load(schema)['mapping']['setting']['mapping']
pieper commented 7 months ago

@JoostJM would you be able to have a look at this? It should be a simple fix but the CI is failing.

pieper commented 6 months ago

I've tested this manually on linux and it does fix the runtime issue. @JoostJM or @fedorov can you merge it? I'm not sure what's wrong with circleci but it looks like the ci code has the same issue that this PR fixes in pyradiomics itself and I don't think it should block this PR.