# Problem with ROI and betas dimensions

Dear TDT experts,

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’;

What could I do to deal with this error?
If anyone could help with this quire I would greatly appreciate it.

Kind regards,
Karel

Hi Karel,

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)

Best,
Martin

Continuing the discussion from Problem with ROI and betas dimensions:

Hi Martin,

Thanks for your prompt response. I resampled the mask and It worked! Thank you so much.

Best,
Karel