pyplati / platipy

Processing Library and Analysis Toolkit for Medical Imaging in Python
https://pyplati.github.io/platipy/
Apache License 2.0
103 stars 24 forks source link

KeyError: 'Struct 0' error #208

Open hakim-sina opened 1 year ago

hakim-sina commented 1 year ago

I'm using platipy cardiac to segment a group of nifts. It works fine for most of them but throws this error for some of them. It looks like the first stage of segmentation runs without errors but it is not returning the expected dictionary. Any suggestions as how to fix this ?

image
pchlap commented 1 year ago

Hi @hakim-sina, thanks for posting your issue.

I imagine that the first part (wholeheart DL segmentation) is failing for those patients. The tool probably isn't throwing an error, it just moves on to the next step even though it wasn't able to automatically segment the whole heart (we should probably improve our error handling there).

Is there something unique about those images on which it's failing on? What type of images are you using? This tool was trained on Radiotherapy CT scans so I can't predict how it will work on other types of scans.

hakim-sina commented 1 year ago

Thanks @pchlap for getting back to me ... indeed you are correct, it looks like for soma bizarre reason some of our dicoms became colour inverted In the step prior to segmentation. Adding a quality control step prior to segmentation resolved the problem... I am interested to see how it might perform on cMRI though