Sikerdebaard / dcmrtstruct2nii

DICOM RT-Struct to mask
MIT License
91 stars 27 forks source link

A vectorized approach to coord conversion. Provides a significant speed up. #44

Open mathiser opened 1 year ago

mathiser commented 1 year ago

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: 1) doing all coord transforms in one numpy call 2) only drawing contour for the area and resampling the contour back to the original image again.

Mathis

Sikerdebaard commented 1 year ago

Hi @mathiser

I have tried to run your vectorized solution and I am running into two issues:

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?

mathiser commented 1 year ago

Yirks, sorry about that. I'll review it ASAP...