qurit / rt-utils

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

No SOPClass UID after add_roi #113

Open marrissa-mcintosh opened 4 months ago

marrissa-mcintosh commented 4 months ago

I am trying to create a new RT struct using a mask segmented via MATLAB and imported into Python as a numpy array. I used add_roi and then validated the RT struct using RTStructBuilder.validate_rtstruct. This throws an error "AttributeError: 'RTStruct' object has no attribute 'SOPClassUID'". The new RT struct also does not have attributes "ROIContourSequence", "StructureSetROISequence", or "RTROIObservationsSequence". Any suggestions on how to figure out what is going wrong or how to fix it would be helpful!