From 8a12b0207f1328a56f99fc497f1a63ee702a3b7e Mon Sep 17 00:00:00 2001 From: Amal Joseph Varghese <50216683+amaljova@users.noreply.github.com> Date: Thu, 7 Jul 2022 10:51:13 +0530 Subject: [PATCH] Fixed a logic error in Img_Bimask function. Fixed a logic error in choosing the modalities for creating the binary mask. --- PyrexReader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PyrexReader.py b/PyrexReader.py index ee5d5d9..b4909d5 100644 --- a/PyrexReader.py +++ b/PyrexReader.py @@ -102,7 +102,8 @@ def Img_Bimask(img_path,rtstruct_path,ROI_name): # generating image array and bi ROI_id = match_ROIid(rtstruct_path,ROI_name) #Check DICOM file Modality - if IM.Modality == 'CT' or 'PT': + # Check for the modalities 'CT' or 'PET' + if IM.Modality == 'CT' or IM.Modality == 'PT': for k in range(len(M.ROIContourSequence[ROI_id].ContourSequence)): Cpostion_rt = M.ROIContourSequence[ROI_id].ContourSequence[k].ContourData[2] for i in range(num_slice):