qurit / rt-utils

A minimal Python library to facilitate the creation and manipulation of DICOM RTStructs.
MIT License
191 stars 56 forks source link

Support non-existant SeriesDate and SeriesTime #21

Closed pchlap closed 3 years ago

pchlap commented 3 years ago

Here's a very simple change to support DICOM where the SeriesDate and SeriesTime aren't set. This addresses #20.

I was also having a look at #19 and I'd be happy to incorporate a solution to that in here too. I believe a suggestion in that thread was to sort using the 3 component of ImagePositionPatient..? I can't think of any reason why this wouldn't work? Alternatively we could check if SliceLocation is available and if not fall back to the ImagePositionPatient?

Cheers Phil

awtkns commented 3 years ago

@pchlap this should good to go, just waiting for feedback from @carluri and then we should be good to merge. As for #19, that would be awesome if you wanted to looking into. I think it would be safer to default to SliceLocation and then fall back to ImagePositionPatient if necessary. Thanks again for helping out! 🙂