I am trying to analyze data with in a ROI which I created from the resulting clusters in SPM. The problem is that in default parameters apparently TDT takes all the betas and the’ mask.nii’ file. An error appear when I specify the ROI file instead the the original mask file (both extensión are ‘.nii’).
The error is the following one: “Error using decoding_load_data (line 227)
Dimension of image in file F:\fMRI\Decoding_toolbox_MVPA\ \RESULTADOS_SIX_REGRESS\VOCT.nii is different from dimension of the mask file(s)/the first data image file, please check!Dimension of image in file F:\fMRI\Decoding_toolbox_MVPA\ \RESULTADOS_SIX_REGRESS\beta_0001.nii is different from dimension of the mask file(s)/the first data image file, please check!”.
Here are the related variables which I specified:
cfg.analysis = ‘ROI’;
beta_loc = ‘F:\fMRI\Decoding_toolbox_MVPA\1\RESULTADOS_SIX_REGRESS’
cfg.files.mask = ‘F:\fMRI\Decoding_toolbox_MVPA\1\RESULTADOS_SIX_REGRESS\VOCT_roi.nii’
What could I do to deal with this error?
If anyone could help with this quire I would greatly appreciate it.
It looks like your mask file has a different image resolution than your brain images. That means there is no unique assignment possible between voxels in the mask and voxels in the brain images. You can solve this by resampling the mask to the brain size.
In case you don’t know how to change the voxel size, Kai wrote a script that does that for you, which you can find in the folder utils (tdtutil_change_voxelsize_or_bb.m)
I’ve run into the same problem. However, while my images differ in their dimensions (beta maps: 96 x 94 x 42; mask: 6 x 6 x 5), the voxels in both my mask and beta maps are the same size (2.6 2.6 2.6). So, if I’m understanding this correctly, resampling the voxels of the mask will not solve this (?)
What should I do? I’m using marsbar to define ROIs using an independent functional localizer. Should I be using a different toolbox that preserves the original dimensions of the images after extracting clusters?
Thank you for taking the time to read through this,
Gaël
Me again, turns out I was making a really dumb mistake when exporting my ROI image to be a nii file: I was using the native space of the roi.mat file instead of selecting a whole brain mask of the participant.
Sorry for the useless posting,
Gaël