Hello Pritha (et al.),
I just now ran into the same error message and stumbled across your email while looking for hints. I found what I _think_ is a solution for my case and was curious to see if my fix is misguided.
I'm using 4D NIFTI files throughout my pipeline, and it seemed that the spm_get_data() function was failing because the 'fname' parameter was including the trailing volume number (e.g. 'foo.nii,5'). Switching line 37 in spm_get_data.m from
[p,n,e] = fileparts(V(i).fname);
to
[p,n,e] = spm_fileparts(V(i).fname);
fixed the issue. Is this a bug, or am I missing something about the way I should be handling the NIFTI files? TIA for any help or advice.
Cheers,
Bill
|