MNI space scans don't line up

40 views
Skip to first unread message

Jake E Toth

unread,
May 30, 2022, 11:41:24 AM5/30/22
to roast-users
Hello,

I am trying to compare the position of the 95th percentile of the electric field between different participants.

To do this I convert all the grey matter voxels to MNI space by multiplying the position of all the grey matter voxels by mri2mni, please see the code below:

mappingFile = [dirName fileName '_seg8.mat']; 
 load(mappingFile,'image','Affine');
 mni2mri = inv(image(1).mat)*inv(Affine);
 mri2mni = inv(mni2mri);

% Convert grey matter coords to MNI space
greyCoords(4, :) = 1;
for i = 1:size(greyCoords, 2)
    mniGreyCoords(:, i) = [greyCoords(:, i)' * mri2mni]';
 end


"greyCoords" is a 4 x N matrix where N is the number of grey matter voxels. Each row corresponds to the x, y and z positions. The final row is all equal to 1.

However, I am finding that the MNI space voxels are not well aligned between participants, so making comparisons is difficult. The image attached exaggerates the problem as the voxels in red do go much further into the blue brain. In reality, the scans are roughly the same size, but are a cm or two misaligned. Ideally, I would like to convert the results to MNI space, find the 95th percentile of voxels by magnitude and compute the DICE coefficient to see how the electric fields overlap for different participants.
mnispace.jpg
But the overlap is very small, and often 0 because the scans aren't aligned. Do you have any advice on where I might be going wrong?

Thank you!

Kind regards,
Jake 

Yu (Andy) Huang

unread,
May 31, 2022, 10:36:08 AM5/31/22
to Jake E Toth, roast-users
Hi Jake,

Thanks for sharing your efforts. The mri2mni is just an affine transform which is linear and cannot warp the head to match to other heads. I think you might need a non-linear warp. You can look into DARTEL tool implemented in SPM.

Hope this helps. 

--
You received this message because you are subscribed to the Google Groups "roast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to roast-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/roast-users/60bb38d7-cd1a-437e-8ea9-344f9f500ae6n%40googlegroups.com.


--
Yu (Andy) Huang, Ph.D.

Research Associate, Radiology Dept., Memorial Sloan Kettering Cancer Center
Rm. 321-G17P, 321 East 61st Street, New York, NY 10065
Office: 646-608-7608

Research Associate, CCNY-MSK Partnership for Artificial Intelligence
Center for Discovery and Innovation, Rm. 3.320,
85 St Nicholas Terrace, New York, NY 10031
Email: yhua...@citymail.cuny.edu; andypo...@gmail.com
Web: http://www.parralab.org/people/yu-andy-huang/

Jake E Toth

unread,
May 31, 2022, 3:49:32 PM5/31/22
to roast-users
Thanks again Andy! I will make sure to update the group when I have a final solution.

Kind regards,
Jake
Reply all
Reply to author
Forward
0 new messages