From 7e37d272cec301eae0e54747d46168cd47448e37 Mon Sep 17 00:00:00 2001 From: Julien Cohen-Adad Date: Tue, 16 Jan 2024 08:38:50 -0500 Subject: [PATCH] Clarified interpolation choices (#41) Fixes #40 --- data_processing.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data_processing.ipynb b/data_processing.ipynb index 33635f2..797bed0 100644 --- a/data_processing.ipynb +++ b/data_processing.ipynb @@ -313,7 +313,9 @@ "for subject in subjects:\n", " os.chdir(os.path.join(path_data, subject, \"fmap\"))\n", " for shim_mode in shim_modes:\n", + " # Use linear interpolation to preserve partial volume information (needed when extracting values along the cord) " !sct_apply_transfo -i ../anat/{subject}_acq-CoV_T2starw_crop_seg.nii.gz -d {subject}_acq-anat{shim_mode}_TB1TFL.nii.gz -w warp_{subject}_acq-CoV_T2starw_crop2{subject}_acq-anat{shim_mode}_TB1TFL.nii.gz -x linear -o {subject}_acq-anat{shim_mode}_TB1TFL_seg.nii.gz\n", + " # Use nearest neighbour (nn) interpolation because we are dealing with non-binary discrete labels " !sct_apply_transfo -i ../anat/{subject}_acq-CoV_T2starw_crop_seg_labeled.nii.gz -d {subject}_acq-anat{shim_mode}_TB1TFL.nii.gz -w warp_{subject}_acq-CoV_T2starw_crop2{subject}_acq-anat{shim_mode}_TB1TFL.nii.gz -x nn -o {subject}_acq-anat{shim_mode}_TB1TFL_seg_labeled.nii.gz" ] },