From c5634ff2cdba50fec1c06275ecde3da7bc5a5df7 Mon Sep 17 00:00:00 2001 From: Thomas Sanchez Date: Thu, 4 Apr 2024 12:03:02 +0200 Subject: [PATCH] Add options to run the code without preprocessing nor SVR --- fetal_brain_utils/cli/run_niftymic.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fetal_brain_utils/cli/run_niftymic.py b/fetal_brain_utils/cli/run_niftymic.py index 37df0e7..85de649 100644 --- a/fetal_brain_utils/cli/run_niftymic.py +++ b/fetal_brain_utils/cli/run_niftymic.py @@ -185,7 +185,9 @@ def iterate_subject( cmd += ( " --bias-field-correction 0 " "--intensity-correction 0 " - "--run-recon-template-space 0" + "--run-recon-template-space 0 " + "--two-step-cycles 0 " + "--automatic-target-stack 0" ) print("RECONSTRUCTION STAGE") print(cmd) @@ -216,13 +218,20 @@ def iterate_subject( final_mask = final_base + "_mask.nii.gz" if not fake_run: + if no_preprocessing: + rec_path = recon_path / "recon_subject_space/srr_subject.nii.gz" + mask_path = recon_path / "recon_subject_space/srr_subject_mask.nii.gz" + + else: + rec_path = recon_path / "recon_template_space/srr_template.nii.gz" + mask_path = recon_path / "recon_template_space/srr_template_mask.nii.gz" shutil.copyfile( - recon_path / "recon_template_space/srr_template.nii.gz", + rec_path, final_rec, ) shutil.copyfile( - recon_path / "recon_template_space/srr_template_mask.nii.gz", + mask_path, final_mask, )