From 3cb5bb8a7168b9ac8d4e2bc6ba8e74b4e06dad42 Mon Sep 17 00:00:00 2001 From: Greg Conan Date: Fri, 29 Apr 2022 16:37:53 -0500 Subject: [PATCH 1/2] Minor preBIBSnet registration fix --- run.py | 1 - src/utilities.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/run.py b/run.py index 2f7df2f..6017617 100755 --- a/run.py +++ b/run.py @@ -380,7 +380,6 @@ def run_postBIBSnet(j_args, logger): copy_to_derivatives_dir(each_mask, derivs_dir, sub_ses, "brain_mask") # TODO Can these be symlinks? # TODO Get dataset_description.json and put it in derivs_dir - # TODO Add padding? No, this is no longer necessary due to RobustFOV logger.info("PostBIBSnet has completed.") return j_args diff --git a/src/utilities.py b/src/utilities.py index a773e14..9ba6f93 100755 --- a/src/utilities.py +++ b/src/utilities.py @@ -660,7 +660,7 @@ def registration_T2w_to_T1w(j_args, logger, xfm_vars, reg_input_var, acpc): if not acpc: # TODO Should this go in its own function? run_FSL_sh_script( # TODO Should the output image even be created here, or during applywarp? j_args, logger, "flirt", - "-in", xfm_vars[reg_input_var.format(t)], # Input: Cropped image + "-in", xfm_vars[reg_input_var.format(t)] if t == 1 else registration_outputs["T2w"], # Input: Cropped image "-ref", xfm_vars["ref_non_ACPC"], "-applyisoxfm", xfm_vars["resolution"], "-init", xfm_vars["ident_mx"], # registration_outputs["cropT{}tocropT1".format(t)], From a8342cf511b8afd9a62346faf6d634abfdfab593 Mon Sep 17 00:00:00 2001 From: Greg Conan Date: Fri, 29 Apr 2022 17:09:18 -0500 Subject: [PATCH 2/2] Minor edit adding a TODO comment --- src/utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utilities.py b/src/utilities.py index 9ba6f93..2524d57 100755 --- a/src/utilities.py +++ b/src/utilities.py @@ -313,7 +313,7 @@ def crop_image(input_avg_img, output_crop_img, j_args, logger): crop2full = os.path.join(output_crop_dir, "crop2full.mat") # TODO Define this path outside of stages because it's used by preBIBSnet and postBIBSnet run_FSL_sh_script(j_args, logger, "robustfov", "-i", input_avg_img, "-m", crop2full, "-r", output_crop_img, - "-b", j_args["preBIBSnet"]["brain_z_size"]) + "-b", j_args["preBIBSnet"]["brain_z_size"]) # TODO Use head radius for -b return crop2full