dcmrtstruct2nii
dcmrtstruct2nii copied to clipboard
A vectorized approach to coord conversion. Provides a significant speed up.
Hi @Sikerdebaard Another PR with vectorized approach. A little tweaked compared to the other PR I closed yesterday. It provides a significant speed up by approximately 50 % (1 min 3 sec vs 28 sec in my test)
It does two things:
- doing all coord transforms in one numpy call
- only drawing contour for the area and resampling the contour back to the original image again.
Mathis
Hi @mathiser
I have tried to run your vectorized solution and I am running into two issues:
- There is a merge conflict when trying to merge this PR with the master branch
- The IoU scores on the unit tests are reported as 0, which means no overlap
Especially the last issue seems problematic. It shows that the resulting masks in the nii files have no overlap with the expected masks. Upon manual inspection this seems to be because the mask is empty. Is it possible for you to have a look at this issue?
Yirks, sorry about that. I'll review it ASAP...