Skip to content

Commit

Permalink
Fixed error with wrong variable names, for CT folder path
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogtaba-Alim committed Dec 20, 2023
1 parent 9f8efcd commit 302a284
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/yarea/image_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 302a284

Please sign in to comment.