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.16k stars 500 forks source link

[BUG] 3D Slicer Error #731

Open codeenthusiast opened 3 years ago

codeenthusiast commented 3 years ago

Describe the bug I have a CT head with an anatomical structure that has been segmented. I have used the "Radiomics" module in 3D slicer and am unfortunately getting the following error:

Screen Shot 2021-11-02 at 12 07 53 PM

Extraction complete Cleaning up...

PyRadiomics configuration I have been using the Params.yaml as provided in the examples folder

PyRadiomics log file ............Done [2021-11-02 12:04:26] I: radiomics.script: Starting PyRadiomics (version: v3.0.1.post4+gad5b2de) [2021-11-02 12:04:26] I: radiomics.script: Processing input... [2021-11-02 12:04:26] I: radiomics.featureextractor: Loading parameter file /Users/Documents/GitHub/pyradiomics/examples/exampleSettings/Params.yaml [2021-11-02 12:04:26] I: radiomics.featureextractor: Applying custom setting overrides: {'label': 1, 'correctMask': True} [2021-11-02 12:04:26] I: radiomics.script: Input valid, starting sequential extraction from 1 case(s)... [2021-11-02 12:04:26] I: radiomics.script: Processing case 1 [2021-11-02 12:04:26] I: radiomics.featureextractor: Calculating features with label: 1 [2021-11-02 12:04:26] I: radiomics.featureextractor: Loading image and mask [2021-11-02 12:04:26] E: radiomics.script: Feature extraction failed! Traceback (most recent call last): File "/Applications/Slicer.app/Contents/Extensions-29738/SlicerRadiomics/lib/python3.6/site-packages/radiomics/scripts/segment.py", line 70, in _extractFeatures feature_vector.update(extractor.execute(imageFilepath, maskFilepath, label, label_channel)) File "/Applications/Slicer.app/Contents/Extensions-29738/SlicerRadiomics/lib/python3.6/site-packages/radiomics/featureextractor.py", line 272, in execute image, mask = self.loadImage(imageFilepath, maskFilepath, generalInfo, _settings) File "/Applications/Slicer.app/Contents/Extensions-29738/SlicerRadiomics/lib/python3.6/site-packages/radiomics/featureextractor.py", line 382, in loadImage raise ValueError('Error reading mask Filepath or SimpleITK object') ValueError: Error reading mask Filepath or SimpleITK object [2021-11-02 12:04:26] I: radiomics.script: Processing results... [2021-11-02 12:04:26] I: radiomics.script: Finished segment-based extraction successfully...

Version (please complete the following information):