From 51e8dfc8817c9250069b6153d9d543f094e62640 Mon Sep 17 00:00:00 2001 From: buccimtpc <35525053+buccimtpc@users.noreply.github.com> Date: Fri, 7 Feb 2020 11:06:31 +0200 Subject: [PATCH] Tested and working. Just a draft. Not many comments. Let me know what you think --- magia_mri_check.m | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 magia_mri_check.m diff --git a/magia_mri_check.m b/magia_mri_check.m new file mode 100644 index 0000000..75da740 --- /dev/null +++ b/magia_mri_check.m @@ -0,0 +1,23 @@ +function [msg] = magia_mri_check(list) + +% Runs magia_get_mri_file on a list of image_id to verify that the MRI (T1) +% is valid for analysis + +msg = list; + +for i=1:length(list) + + try + + mri_code=aivo_get_info(list{i},'mri_code'); + magia_get_mri_file(list{i},mri_code{1}); + msg{i,2}= 'MRI valid for analysis'; + + catch + + msg{i,2}= 'ERROR: MRI not valid for analysis. Redownload necessary!'; + + end + +end + \ No newline at end of file