platipy
platipy copied to clipboard
KeyError: 'Struct 0' error
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 ?
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.
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