From 723f70ea32fb51ea2818d89cb65df9cae7ea72b0 Mon Sep 17 00:00:00 2001 From: Adam Coates <123807847+adamcoatess@users.noreply.github.com> Date: Mon, 3 Jul 2023 10:19:32 +0200 Subject: [PATCH] Changes to the output path Allow the functions to output the full path to the output --- func/presurf_INV2.m | 3 ++- func/presurf_MPRAGEise.m | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/func/presurf_INV2.m b/func/presurf_INV2.m index 61cc4ed..06678db 100755 --- a/func/presurf_INV2.m +++ b/func/presurf_INV2.m @@ -1,4 +1,4 @@ -function presurf_INV2(full_path_to_file) +function [full_path_to_out, biascorr]=presurf_INV2(full_path_to_file) disp(' '); disp('+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'); disp([datestr(datetime('now')), ' Start Pre-processing INV2']); @@ -113,6 +113,7 @@ function presurf_INV2(full_path_to_file) % Bias corrected file copyfile(fullfile(full_path_to_out,['m',in_file_name]), fullfile(full_path_to_out,[in_file_prefix,'_biascorrected.nii'])); +biascorr=fullfile(full_path_to_out,[in_file_prefix,'_biascorrected.nii']); delete(fullfile(full_path_to_out,['m',in_file_name])); % Bias field file diff --git a/func/presurf_MPRAGEise.m b/func/presurf_MPRAGEise.m index 1edc181..a472c88 100644 --- a/func/presurf_MPRAGEise.m +++ b/func/presurf_MPRAGEise.m @@ -1,4 +1,4 @@ -function full_path_to_output = presurf_MPRAGEise(full_path_to_inv2,full_path_to_uni) +function [full_path_to_output] = presurf_MPRAGEise(full_path_to_inv2,full_path_to_uni) disp(' '); disp('+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'); disp([datestr(datetime('now')), ' Start MPRAGEising']);