From 302a284b904ceee539fee64b52b22c1e03f28fe1 Mon Sep 17 00:00:00 2001 From: Mogtaba-Alim Date: Wed, 20 Dec 2023 16:15:30 -0500 Subject: [PATCH] Fixed error with wrong variable names, for CT folder path --- src/yarea/image_processing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yarea/image_processing.py b/src/yarea/image_processing.py index 3af1eef..55efd58 100644 --- a/src/yarea/image_processing.py +++ b/src/yarea/image_processing.py @@ -88,7 +88,7 @@ def padSegToMatchCT(ctDirPath:str, # Load the CT image to align the segmentation to if not passed as argument if ctImage == None: - ctImage = loadDicomSITK(ctFolderPath) + ctImage = loadDicomSITK(ctDirPath) # Load in the segmentation image if not passed as argument if alignedSegImage == None: @@ -102,8 +102,8 @@ def padSegToMatchCT(ctDirPath:str, alignedSegImage = alignImages(ctImage, segImage) # Load in header information for the CT and SEG files - ctSeries = Series(ctFolderPath) - segWithHeader = pydicom.dcmread(segFilePath, stop_before_pixels=True) + ctSeries = Series(ctDirPath) + segWithHeader = pydicom.dcmread(segImagePath, stop_before_pixels=True) # Get the first and last reference ID for the slices of the CT that are in the SEG file lastSliceRef = segWithHeader.ReferencedSeriesSequence[0].ReferencedInstanceSequence[0].ReferencedSOPInstanceUID