diff --git a/spm_funcs.py b/spm_funcs.py index 450c1ab..446778b 100644 --- a/spm_funcs.py +++ b/spm_funcs.py @@ -55,7 +55,18 @@ 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) + #solution done before, retrying pushing to new branch. def main():