qurit / rt-utils

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

Contour Sequence should be optional. #67

Closed MaxenceLarose closed 1 year ago

MaxenceLarose commented 1 year ago

Hi,

Thank you for this awesome tool!

Contour Sequence is Type 3 (Optional), there's no guarantee it'll be present in a given item in the ROI Contour Sequence. I recently stumbled on AttributeError: 'Dataset' object has no attribute 'ContourSequence' while loading an existing RT Struct contour as a mask.

I think this error should not occur. I managed to fix it and will make a pull request to review my correction.

Best,

Maxence

asim-shrestha commented 1 year ago

Hey Maxence, thanks for looking into this! Merged :)