[FieldTrip] Problem with reading fMRI nifti file

Anke Ninija Karabanov anke at nexs.ku.dk
Wed Dec 29 23:36:25 CET 2021

I will be out of offie from December 21st to 4th of January and will be checking my email only infrequently during this time. I will respond to your email when I return.


On 22 Dec 2021, at 09.57, 姜文浩 via fieldtrip <fieldtrip at science.ru.nl> wrote:

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)

 How can I fix the problem?

Thanks in advance!
fieldtrip mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211229/42eb8158/attachment.htm>

More information about the fieldtrip mailing list