I am trying to overlay surface information acquired with freesurfer on to the original MRI volume. I tried reading lh.orig with [vertices,faces] = freesurfer_read_surf('surf/lh.orig') and then transforming the vertices with the matrix:
vertices_affine = [vertices' ; ones(1,size(vertices,1))] # append the affine coordinates overlay = (rsb2vox*inv(M)) * vertices_affine
where
M = xfm_read('mri/transforms/talairach.xfm')
and
rsb2vox = inv([ [-1 0 0 128 ; 0 0 1 -128; 0 -1 0 128; 0 0 0 1] ])
I was lead to believe that this is the correct procedure by reading the 'official' description of the coordinate systems on the freesurfer wiki ( http://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems ). Unfortunately the scaling and translation is incorrect. I've also tried other permutations of the above matrix multiplication without any luck. Am I doing something incorrectly?
Thanks, Lloyd Elliott
what are you trying to do? If you're trying to bring the surface coords into talairach (mni305) space, then you can use mri_surf2surf with the --sval-xyz-tal orig --taval-xyz options.
Lloyd Elliott wrote:
I am trying to overlay surface information acquired with freesurfer on to the original MRI volume. I tried reading lh.orig with [vertices,faces] = freesurfer_read_surf('surf/lh.orig') and then transforming the vertices with the matrix:
vertices_affine = [vertices' ; ones(1,size(vertices,1))] # append the affine coordinates overlay = (rsb2vox*inv(M)) * vertices_affine
where
M = xfm_read('mri/transforms/talairach.xfm')
and
rsb2vox = inv([ [-1 0 0 128 ; 0 0 1 -128; 0 -1 0 128; 0 0 0 1] ])
I was lead to believe that this is the correct procedure by reading the 'official' description of the coordinate systems on the freesurfer wiki ( http://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems ). Unfortunately the scaling and translation is incorrect. I've also tried other permutations of the above matrix multiplication without any luck. Am I doing something incorrectly?
Thanks, Lloyd Elliott _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi Lloyd, I dealt with the same problem at one time. My input volume was a minc volume but I imagine the procedure should work for your input as well.
for native.mnc, which was your input into freesurfer, do this command: mri_info --cras native.mnc my output was -2.35588 52.7907 24.8145
Then you can create the following transformation matrix: 1 0 0 -2.35588 0 1 0 52.7907 0 0 1 24.8145 0 0 0 1
You can then transform each co-ordinate point in your surface with the above transformation matrix and then your surfaces will be in what the MNI calls world co-cordinate space (these are referred to as "scanner RAS" on the freesurfer wiki coordinate page).
Overlaying this new surface with my native.mnc worked for me. mishkin
On Thu, Feb 19, 2009 at 5:17 PM, Douglas N Greve greve@nmr.mgh.harvard.edu wrote:
what are you trying to do? If you're trying to bring the surface coords into talairach (mni305) space, then you can use mri_surf2surf with the --sval-xyz-tal orig --taval-xyz options.
Lloyd Elliott wrote:
I am trying to overlay surface information acquired with freesurfer on to the original MRI volume. I tried reading lh.orig with [vertices,faces] = freesurfer_read_surf('surf/lh.orig') and then transforming the vertices with the matrix:
vertices_affine = [vertices' ; ones(1,size(vertices,1))] # append the affine coordinates overlay = (rsb2vox*inv(M)) * vertices_affine
where
M = xfm_read('mri/transforms/talairach.xfm')
and
rsb2vox = inv([ [-1 0 0 128 ; 0 0 1 -128; 0 -1 0 128; 0 0 0 1] ])
I was lead to believe that this is the correct procedure by reading the 'official' description of the coordinate systems on the freesurfer wiki ( http://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems ). Unfortunately the scaling and translation is incorrect. I've also tried other permutations of the above matrix multiplication without any luck. Am I doing something incorrectly?
Thanks, Lloyd Elliott _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu