[FieldTrip] Problem with reading fMRI nifti file

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Mon Jan 3 13:21:06 CET 2022


Dear 姜文浩,


If you want to do ’straightforward’ fMRI analysis I would not recommend to use FieldTrip for this.

However, if you are adamant, you need to be sure to have at least the latest version of the code (which you didn’t specify), and you need to provide the readership with some additional pointers. I don’t know where to get the data you reportedly use, so even if I were to make some time to look into this for/with you, I wouldn’t know how to start.

So: how did you get the data to execute the code on this ‘getting started’ page, etc?

Best wishes,
Jan-Mathijs


On 22 Dec 2021, at 09:57, 姜文浩 via fieldtrip <fieldtrip at science.ru.nl<mailto: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/<https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/getting_started/fmri/__;!!HJOPV4FYYWzcc1jazlU!5_RROW62nG12rLQWnGoshRrXo0O_fMYIBRdOGqo9WFIxNQcE4a2ibWEbL7ZR3f1P6HKHyCJHJL0N037uitdhW0nGiTz4F8b3dK6slw$>). 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!

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!5_RROW62nG12rLQWnGoshRrXo0O_fMYIBRdOGqo9WFIxNQcE4a2ibWEbL7ZR3f1P6HKHyCJHJL0N037uitdhW0nGiTz4F8YAuu5JUw$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220103/56e560c1/attachment.htm>


More information about the fieldtrip mailing list