Images look different from AFNI after mrconvert

Hi,

I’m creating my ROI masks using AFNI and mrconvert to convert the nii files to mif to work with mrtrix commands. But the images look different when they are on the same T1 file.

Here is the one from AFNI:

and one from mrview after the nii file is converted to mif format:

I know that AFNI and Mrtrix have different default orientation settings (LPI versus LAS?), but I am not sure how to fix this issue.
The output from mrinfo is:

Dimensions: 96 x 125 x 125
Voxel size: 2 x 2 x 2
Data strides: [ 1 2 3 ]
Format: MRtrix
Data type: unsigned 8 bit integer
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 -0 -0 -94.27
-0 1 -0 -132.5
0 0 1 -116.4

And, 3dinfo from AFNI says:
Data Axes Orientation:
first (x) = Left-to-Right
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient LPI]
R-to-L extent: -95.726 [R] -to- 94.274 [L] -step- 2.000 mm [ 96 voxels]
A-to-P extent: -115.507 [A] -to- 132.493 [P] -step- 2.000 mm [125 voxels]
I-to-S extent: -116.433 [I] -to- 131.567 [S] -step- 2.000 mm [125 voxels]

I would appreciate any advice! Thanks so much.
Yaelan

Hi Yaelan,
This looks like a strides issue.

When converting the ROI to a mif, consider specifying strides:

mrconvert <ROI.nii> -strides <T1.mif> <ROI.mif>

This will match the strides of the ROI with the strides of the T1.

Hope this helps :slight_smile:

Cheers,
Arkiev

Thanks for the suggestion, Arkiev!
But, it still looks the same when I provide the strides option :frowning:

I can upload the files if that can be helpful! Let me know!

Thanks for testing that out :slight_smile: It might be helpful to take a look at the files. Feel free to upload them or share them via direct message.

I sent you a link to the files. Thanks so much!!

1 Like