Which method is best to match an ROI to fMRI data?

Hi, recently, I am trying to extract information from a preprocessed fMRI data (beta image) with a mask file which is transformed from DTI tract image.

The DTI tractography is done in native space by mrtrix3. The fMRI data is normalized to MNI152 template. So I normalized the native DTI image to MNI152 (using ANTs with 2 steps). Finally, I get binary mask of each tract in MNI152 and fMRI data in MNI152. However, the voxel size and dimensions of these two kinds of data are not the same.
When I execute:

mrstats -mask mask.nii fMRI.nii -output mean

I get error: dimension mismatch between mask.nii and fMRI.nii
So I use mrinfo to check two files and find:


Image name: “mask.nii”


Dimensions: 157 x 189 x 136
Voxel size: 1 x 1 x 1
Data strides: [ 1 2 3 ]
Format: NIfTI-1.1
Data type: 64 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 0 -0 -78
0 1 -0 -112
0 0 1 -50


Image name: “fMRI.nii”


Dimensions: 64 x 76 x 64
Voxel size: 3 x 3 x 3
Data strides: [ 1 2 3 ]
Format: NIfTI-1.1
Data type: 32 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 -0 -0 -94.5
-0 1 -0 -130.5
0 0 1 -76.5

I search this problem and find that mrgrid may be a solution.
I tried that:
mrgrid mask.nii regard -template fMRI.nii mask_grid.nii -interp nearest

Then I check the result and fond that the mask_grid.nii overlapped with mask.nii mostly. But their outline is a bit different and the voxel values near the outline are different.
I don’t know is this the appropriate method for this situation?
Or is their any other better methods?
Thanks a lot.

Hi @Roger1219,

You need to resample the dwi masks to match the resolution and matrix size of the func data. In your antsApplyTransforms step, instead of specifying the MNI-space image (1mm), use a func-ref file (3mm) that is in MNI-space. Applying a transform uses the reference image header to determine the output resolution and matrix, as the transforms specify where in world space the resulting matrix is positioned.

Cheers,
Carl

Thank you for your detailed reply.
I tried your solution and it does work. It also helped me understand “antsApplyTransforms” tool.

Best,
Roger