From 3ec8ad81a169ef13db8cae19784e922269e8f4a6 Mon Sep 17 00:00:00 2001 From: manmohidake Date: Mon, 19 Sep 2022 12:42:04 +0100 Subject: [PATCH 1/2] Some changes to SPM functions --- spm_funcs.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spm_funcs.py b/spm_funcs.py index 450c1ab..5e74f48 100644 --- a/spm_funcs.py +++ b/spm_funcs.py @@ -55,7 +55,17 @@ def get_spm_globals(fname): SPM global metric for each 3D volume in the 4D image. """ # +++your code here+++ + # LAB(begin solution) + img = nib.load(fname) + data = img.get_fdata() + spm_vals = [] + for i in range(data.shape[-1]): + vol = data[..., i] + spm_vals.append(spm_global(vol)) + return spm_vals + # LAB(replace solution) # return + # LAB(end solution) def main(): From 7a77dd5f21c962a390aebe5bc0b17aa8d2519710 Mon Sep 17 00:00:00 2001 From: manmohidake Date: Mon, 19 Sep 2022 12:47:55 +0100 Subject: [PATCH 2/2] Some changes to SPM script --- spm_funcs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spm_funcs.py b/spm_funcs.py index 5e74f48..446778b 100644 --- a/spm_funcs.py +++ b/spm_funcs.py @@ -66,6 +66,7 @@ def get_spm_globals(fname): # LAB(replace solution) # return # LAB(end solution) + #solution done before, retrying pushing to new branch. def main():