help > Conversion between MNI & Image coordinates
Showing 1-5 of 5 posts
Oct 18, 2014 01:10 PM | Guangyu Zhou
Conversion between MNI & Image coordinates
Hi experts,
Is there a simple way to convert the image coordinates to MNI coordinates and vice versa in IIT3 templates (both the 256 and non256 versions)?
Cheers,
Guangyu
Is there a simple way to convert the image coordinates to MNI coordinates and vice versa in IIT3 templates (both the 256 and non256 versions)?
Cheers,
Guangyu
Oct 20, 2014 03:10 PM | Konstantinos Arfanakis - Illinois Institute of Technology
RE: Conversion between MNI & Image coordinates
Hi Guangyu,
The non-256 version is already in MNI space. The 256 version is not.
For the non-256 version, FSLview shows the location of the crosshairs in MNI space.
If you are wondering how to relate a voxel in one of the image volumes of the IIT atlas (row x, column y, slice z) to MNI coordinates, then you simply need to multiply the following matrices:
[-1 0 0 90; 0 1 0 -126; 0 0 1 -72; 0 0 0 1] with [x y z 1]' , for non-256 image volumes of the IIT atlas.
or
[1 0 0 -128; 0 1 0 -145; 0 0 1 -109; 0 0 0 1] with [x y z 1]' , for 256 image volumes of the IIT atlas.
Please note that the x, y, z start at 0, not 1.
Regards,
Konstantinos
The non-256 version is already in MNI space. The 256 version is not.
For the non-256 version, FSLview shows the location of the crosshairs in MNI space.
If you are wondering how to relate a voxel in one of the image volumes of the IIT atlas (row x, column y, slice z) to MNI coordinates, then you simply need to multiply the following matrices:
[-1 0 0 90; 0 1 0 -126; 0 0 1 -72; 0 0 0 1] with [x y z 1]' , for non-256 image volumes of the IIT atlas.
or
[1 0 0 -128; 0 1 0 -145; 0 0 1 -109; 0 0 0 1] with [x y z 1]' , for 256 image volumes of the IIT atlas.
Please note that the x, y, z start at 0, not 1.
Regards,
Konstantinos
Nov 4, 2014 10:11 AM | Guangyu Zhou
RE: Conversion between MNI & Image coordinates
Hi Konstantinos,
Thank you very much for such detailed answer. And also thanks for the great work you've done.
Regards,
Guangyu
Thank you very much for such detailed answer. And also thanks for the great work you've done.
Regards,
Guangyu
Nov 8, 2014 07:11 PM | Ping-Hong Yeh
RE: Conversion between MNI & Image coordinates
Hi Konstantinos,
May I follow up with this string?
Since DTITK re-set the origin to the center and reorients the tensor to LPI, in order to transform back to MNI coordinates, I need to apply "flirt" using "-applyxfm -init" with the matrix, [-1 0 0 90; 0 1 0 -126; 0 0 1 -72; 0 0 0 1], correct?
However, the transformed image did not overly with MNI template. Did I miss anything?
Thank you,
Ping
May I follow up with this string?
Since DTITK re-set the origin to the center and reorients the tensor to LPI, in order to transform back to MNI coordinates, I need to apply "flirt" using "-applyxfm -init" with the matrix, [-1 0 0 90; 0 1 0 -126; 0 0 1 -72; 0 0 0 1], correct?
However, the transformed image did not overly with MNI template. Did I miss anything?
Thank you,
Ping
Nov 11, 2014 02:11 AM | Konstantinos Arfanakis - Illinois Institute of Technology
RE: Conversion between MNI & Image coordinates
Hi Ping,
Please find quick answer below. In addition, we will add an update to our HOW-TO documents in the next few days. Please check back for that.
Firstly, please make sure you have read the "HOW TO register DTI data to the IIT Human Brain Atlas using DTI-TK". You can find it in the Docs. According to those instructions, I assume that you are using the 256x256x256 version of the DTI template. If you follow the instructions and register individual datasets to the 256-version of the template, then by using the following on the registered dataset:
fslorient -setsform 1 0 0 -128 0 1 0 -145 0 0 1 -109 0 0 0 1 [registered dataset]
you will be able to see your registered dataset in fslview in MNI coordinates.
If you further want to put the registered images in the 182x218x182 matrix to be able to overlay them in FSL on MNI anatomical images with the same voxel size (1mm x 1mm x 1mm) then crop the images first, swap the left-right orientation in the images if needed, and then copy the header from the desirable MNI reference. For example:
# crop registered image volume
fslroi [registered image volume] crop 37 182 19 218 37 182
# flip left-right; ignore the warning message
fslswapdim crop -x y z crop-fliplr
# copy header
fslcpgeom MNI152_T1_1mm_brain crop-fliplr
This should work for now. But please check back for the updated HOW-TO in the next few days.
Regards,
Konstantinos
Please find quick answer below. In addition, we will add an update to our HOW-TO documents in the next few days. Please check back for that.
Firstly, please make sure you have read the "HOW TO register DTI data to the IIT Human Brain Atlas using DTI-TK". You can find it in the Docs. According to those instructions, I assume that you are using the 256x256x256 version of the DTI template. If you follow the instructions and register individual datasets to the 256-version of the template, then by using the following on the registered dataset:
fslorient -setsform 1 0 0 -128 0 1 0 -145 0 0 1 -109 0 0 0 1 [registered dataset]
you will be able to see your registered dataset in fslview in MNI coordinates.
If you further want to put the registered images in the 182x218x182 matrix to be able to overlay them in FSL on MNI anatomical images with the same voxel size (1mm x 1mm x 1mm) then crop the images first, swap the left-right orientation in the images if needed, and then copy the header from the desirable MNI reference. For example:
# crop registered image volume
fslroi [registered image volume] crop 37 182 19 218 37 182
# flip left-right; ignore the warning message
fslswapdim crop -x y z crop-fliplr
# copy header
fslcpgeom MNI152_T1_1mm_brain crop-fliplr
This should work for now. But please check back for the updated HOW-TO in the next few days.
Regards,
Konstantinos