platipy icon indicating copy to clipboard operation
platipy copied to clipboard

KeyError: 'Struct 0' error

Open hakim-sina opened this issue 1 year ago • 2 comments

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

hakim-sina avatar May 17 '23 12:05 hakim-sina

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.

pchlap avatar May 18 '23 04:05 pchlap

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

hakim-sina avatar May 19 '23 08:05 hakim-sina