Skip to content

Commit

Permalink
fixed merge between SEGs and CTs, in matchCTtoSegmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogtaba-Alim committed Jan 31, 2024
1 parent 9aaf76c commit fc1dda1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/readii/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def matchCTtoSegmentation(imgFileListPath: str,
# Merge the CT and segmentation dataframes based on the CT ID (referenced in the segmentation rows)
# Uses only segmentation keys, so no extra CTs are kept
# If multiple CTs have the same ID, they are both included in this table
samplesWSeg = allCTRows.merge(allSegRows, how='right',
samplesWSeg = allCTRows.merge(allSegRows, how='inner',
left_on=['series', 'patient_ID'],
right_on=['reference_ct', 'patient_ID'],
suffixes=('_CT','_seg'))
Expand Down
2 changes: 1 addition & 1 deletion src/readii/negative_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def applyNegativeControl(nc_type: str, baseImage: sitk.Image, baseROI: sitk.Imag
return shuffleNonROI(baseImage, baseROI, roiLabel)
elif nc_type == "randomized_sampled_full":
# Make negative control version of ctImage (random sampled pixels from original distribution, same size)
return RandomizeImageFromDistribtutionSampling(baseImage)
return randomizeImageFromDistribtutionSampling(baseImage)
elif nc_type == "randomized_sampled_roi":
# Make negative control version of ctImage (random sampled pixels from original distribution inside ROI, same size)
return makeRandomFromRoiDistribution(baseImage, baseROI, roiLabel)
Expand Down

0 comments on commit fc1dda1

Please sign in to comment.