brianmanderson / Dicom_RT_and_Images_to_Mask

Tools to help with the conversion of DICOM images, RT Structures, and dose to useful Python objects. Essentially DICOM to NumPy and SimpleITK Images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

writing multiple predictions in the same RT struct file

karim1871 opened this issue · comments

Hi Brian, not a bug just a question. I didn't find an option to post questions in the wiki.

Is it possible to write the predictions of 2 models in the same RT struct file?

Something like :

Dicom_reader.prediction_array_to_RT(prediction_array=Mask1_save, output_dir=path
                                     ,ROI_Names=['PTV1', 'PTV2'])
Dicom_reader.prediction_array_to_RT(prediction_array=Mask2_save, output_dir=path
                                     ,ROI_Names=['GTV1', 'GTV2'])

Using the code i get 2 RT struct files.

Hey Karim,

Yes! One way to do it would be to combine your Mask1_save and Mask2_save into one mask, and then do ROI_Names=["PTV1", "PTV2", "GTV1", "GTV2"]

Another would be to set "create_new_RT" to be False after writing the first prediction_array_to_RT