diff --git a/spm_funcs.py b/spm_funcs.py index 450c1ab..d4b3ac8 100644 --- a/spm_funcs.py +++ b/spm_funcs.py @@ -55,6 +55,13 @@ def get_spm_globals(fname): SPM global metric for each 3D volume in the 4D image. """ # +++your code here+++ + 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 # return