[FieldTrip] Problem with reading fMRI nifti file

姜文浩 whjiang at hit.edu.cn
Wed Dec 22 09:57:02 CET 2021


Dear fieldtrippers.




I am currently new to fieldtrip, and would like to analysis fMRI data with the toolbox. 




I started by following the instructions on "Getting started with fMRI timeseries data" (https://www.fieldtriptoolbox.org/getting_started/fmri/). However, when executing the command 

filename4d='sub-01_ses-mri_task-facerecognition_run-01_bold.nii';
volume4d=ft_read_mri(filename4d,'outputfield','functional');
I got a resulting struct with the field "anatomy", which is a 4D double, but not "functional" as it supposed to be regarding the manual.




Moreover, when I proceeded with the remaining code trying to represent the 4D timeseries data as a source representation, I got an error saying

Arrays have incompatible sizes for this operation.

Error in ft_sourceplot>cb_redraw (line 1550)
if any([xi yi zi] > functional.dim) || any([xi yi zi] <= 0)

Error in ft_sourceplot (line 1106)
    cb_redraw(h);





 How can I fix the problem?




Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211222/b8528d7f/attachment.htm>


More information about the fieldtrip mailing list