qurit / rt-utils

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

Change from Exception to warning when the rt's ReferencedSOPInstanceUID is different from the CT's SOPInstanceUID #63

Closed Zhack47 closed 1 year ago

Zhack47 commented 1 year ago

Problem:

Sometimes the CT used by the radiologist for the manual segmentation of ROIs might not be the one put in the final database. To give a concrete example, one might have an injection CT and one without injection, do the rtstruct on the injected one and put the non-injected one in the database.

Consequence

In this case the CT's SOPInstanceUID is different from thee RT's ReferencedSOPInstanceUID, even though the space is the same.

At lines 78-82, the check made raises an error if these are not identical.

Proposition

It would be great if the user could chose whether this should be a warning or an Exception, through a parameter passed to the RTStructBuilder (like strict_check_SOPInstanceUID=False)

If you think it's a good idea, I will submit a pull request for it.

asim-shrestha commented 1 year ago

Closed by #64

Thanks again for working on this!