qurit / rt-utils

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

RTReferencedStudySequence not present in RTSTRUCT dicom file? #33

Closed IlvaHou55 closed 2 years ago

IlvaHou55 commented 2 years ago

Hi,

Because the attribute RTReferencedStudySequence is of type 3 (optional) it can be the case this is omitted in the RTSTRUCT dicom file. Because of this, an error message in validate_rtstruct_series_references.py occurs, when I try to convert the RTSTRUCT contour into a 3D mask in python.

Is this attribute really necessary and can you work around this issue?

Thank you!

IlvaHou55 commented 2 years ago

UPDATE: Just commenting out the part where validate_rtstruct_series_references.py is called, worked for my application.

asim-shrestha commented 2 years ago

Hi @IlvaHou55 thank you for reaching out! That method is a sort of sanity check measure to ensure the RTStruct you have input is indeed only accessing files from the series you have input.

Given that the value is optional, I'll put a work around in sometime this week for when the value is not present.