help > discrepancy between the results of MRIcron V2012 and V2019
Showing 1-4 of 4 posts
Display:
Results per page:
Sep 2, 2020  09:09 AM | Ardalan Aarabi
discrepancy between the results of MRIcron V2012 and V2019
Hi everyone,

In MRIcron, I tried to compute the overalp between two 3D images, one is the natbrainlab.nii (an atlas) and the other is a binary mask, when I use the older version of MRIcron (2012), I find the same results as those that I obtained using the matlab code that I wrote, in other words, I find the exact number of voxles falling into each region of atlas, but when I used the latest version of MRIcron (2019), the number of overlapping voxels/region is more than that I get using the older version as shown in the attached file, any ideas?


Need your kind help
Ardalan
Attachment: Doc6.docx
Sep 2, 2020  10:09 AM | Chris Rorden
RE: discrepancy between the results of MRIcron V2012 and V2019
1. There is not a one-to-one correspondence between the voxels in one image and the other. Therefore, the choice of which image to warp and the choice of interpolation method (nearest neighbor, linear, sinc, etc) will impact your results. This explains why tools like FSL and SPM require image masks to have a perfect correspondence to the image they are applied to. You can see this difference by choosing different "intrep" reslicing with SPM
  https://github.com/rordenlab/spmScripts/blob/master/nii_reslice_target.m

2. Since your image is not orthogonal to the image plane, it will load a little differently as a background image depending on whether you set the Preferences to reorient the images when reloading, which will reslice the data.


fslhd threshZ4V_5VD-qzhoActiv.nii
...
dim1 157
dim2 189
dim3 136
sform_code 2
sto_xyz:1 -1.000000 -0.000159 0.000962 77.945053
sto_xyz:2 -0.000160 0.999999 -0.001155 -111.876495
sto_xyz:3 0.000962 0.001155 0.999999 -50.143166
sto_xyz:4 0.000000 0.000000 0.000000 1.000000

fslhd natbrainlab.nii
...
dim1 182
dim2 218
dim3 182
sto_xyz:1 -1.000000 0.000000 0.000000 90.000000
sto_xyz:2 0.000000 1.000000 0.000000 -126.000000
sto_xyz:3 0.000000 0.000000 1.000000 -72.000000
Sep 2, 2020  01:09 PM | Ardalan Aarabi
RE: discrepancy between the results of MRIcron V2012 and V2019
thanks, I resliced it with different interpolation methods, the results obtained by the latest version are different, moreover, when I computed the total number of voxels listed in the descriptive statistics, with the 2012 version, I get 1025 voxels (the same as the number I get with matlab), but it is different from V2019 (1149, please see the attachment), there are some additional voxels which do not exist in the binary file (threshZ4V_5VD-qzhoActiv.nii),

Regards,
Ardalan
Attachment: 2012.docx
Sep 2, 2020  02:09 PM | Chris Rorden
RE: discrepancy between the results of MRIcron V2012 and V2019
Your atlas is not orthogonal to the image plane, as can be seen by the angulation:

fslhd natbrainlab.nii
  sto_xyz:1 -1.000000 -0.000159 0.000962 77.945053
  sto_xyz:2 -0.000160 0.999999 -0.001155 -111.876495
  sto_xyz:3 0.000962 0.001155 0.999999 -50.143166

In MRIcron go to preferences and turn off "Reorient images when loading" to load in native space rather than reslicing. Open your continuous image that has been been resliced to match the template
  https://github.com/rordenlab/spmScripts/blob/b0d8001ae97e28e662f2052751669bdb7e4bc68e/nii_reslice_target.m
Use MRIcron to compute volumes:

Index Name numVox numVoxNotZero fracNotZero
0 0 3628098 624 0.000
1 1 4875 23 0.005
6 6 46399 2 0.000
7 7 6672 2 0.000
8 8 27876 412 0.015
12 12 11032 55 0.005
13 13 10078 92 0.009
16 16 7310 36 0.005
101 101 5298 89 0.017
102 102 8372 24 0.003
103 103 391 14 0.036
107 107 5071 30 0.006
108 108 22061 488 0.022
111 111 13929 1 0.000
112 112 12566 514 0.041
113 113 17470 144 0.008
116 116 7525 338 0.045

Do the same with Matlab (see attached script)

116 regions in /Users/chris/Downloads/tst/natbrainlab.nii,1
region nZero nPos nNeg nNotFinite mn
0 3627474 0 624 0 -0.00024788
1 4852 0 23 0 -0.00107998
6 46397 0 2 0 -2.99442e-07
7 6670 0 2 0 -3.63876e-08
8 27464 0 412 0 -0.0208179
12 10977 0 55 0 -0.00367871
13 9986 0 92 0 -0.00782235
16 7274 0 36 0 -0.00378585
101 5209 0 89 0 -0.0358616
102 8348 0 24 0 -0.001553
103 377 0 14 0 -0.0221525
107 5041 0 30 0 -0.0110846
108 21573 0 488 0 -0.0314722
111 13928 0 1 0 -5.84004e-07
112 12052 0 514 0 -0.0757793
113 17326 0 144 0 -0.0103095
116 7187 0 338 0 -0.102179

Note the results are the same.
Attachment: roi_count.zip