Closed tomaroberts closed 1 year ago
Would it be easier to just look at the Eclipse log files? Anil said RT Physics should have access.
George sent logs from Eclipse. Same error message repeatedly – lots of invalid VR DS lengths, e.g:
01/19/2023 17:43:26 RTSTRUCT #1 / RTstruct (lymphoma-ct-rt-struct) Warning General Size (18) of "19.034504652023315" is invalid for VR DS 01/19/2023 17:43:26 RTSTRUCT #1 / RTstruct (lymphoma-ct-rt-struct) Warning General Size (19) of "-6.3554956912994385" is invalid for VR DS 01/19/2023 17:43:26 RTSTRUCT #1 / RTstruct (lymphoma-ct-rt-struct) Warning General Size (17) of "5.070004463195801" is invalid for VR DS
These tags correspond to the contours. Investigating DICOM standard (https://dicom.nema.org/dicom/2013/output/chtml/part05/sect_6.2.html) there is a 16 byte maximum size on VR DS items:
So! I'll implement a fix to round these values to <16 decimal places and it should fix it.
Great, it would be great to document this somewhere or build it into a library to help future devs.
TODO:
Edit line 195 in rt_utils/ds_helper.py with something like contour.ContourData = [round(val,10) for val in contour_data]
Then recompile MAP, generate new DICOM RT Struct file and try to open in Eclipse.
Generated some new DICOMs offline with <16 byte DS items. Sent to George for testing in Eclipse.
Can confirm this works! TotalSegmentator-AIDE RTStruct files will open in Eclipse. Have submitted PR to rt-utils repo which will hopefully enable this fix within the package itself, rather than implementing workaround in the MAP.
PR now merged in rt-utils, here: https://github.com/qurit/rt-utils/pull/81
So end-to-end now complete and this issue resolved.
From some quick testing with George on 18/01/2023, we were unable to open the RT Struct
.dcm
files in Eclipse. Need to investigate.Potential things to try:
rt-utils
derived files against RT Struct files exported from Eclipsert-utils
devs