[FieldTrip] reverse-normalising voxel locations to non-interpolated source volumes

Gregor Volberg Gregor.Volberg at psychologie.uni-regensburg.de
Thu Feb 17 15:50:05 CET 2011


Dear list members, 

sorry for asking a lot in recent days - i am entering a new stage of enlightment with respect to source analysis, and there are only one or two questions left until i am there. My current problem is the following: 

I am trying to find the voxel coordinates in an individual source volume that correspond to the voxel coordinates of a ROI, which i identified in the normalized brain. My original source volume is called SOURCE, the interpolated version is SOURCEi, and the normalized volume is NORM. Starting from NORM, I identified voxel coordinates belonging to a ROI, then determined the corresponding head (MNI) coordinates and transformed them into head coordinates of the interpolated individual source SOURCEi:  

[x,y,z] = ind2sub(NORM.dim, find(mask==1)); % voxel indices of a ROI as given in mask 
headcoords_NORM   = warp_apply(NORM.transform, [x y z], 'homogeneous'); % head coordinates of ROI 
headcoords_SOURCEi = warp_apply(inv(NORM.cfg.final), headcoords_NORM, 'homogeneous'); % corresponding head coordinates in SOURCEi 

I checked this with several source plots and the results looked fine.  
Next, i did an LCMV beamformer with the option cfg.keepfilter = 'yes' in order to reconstruct source waveforms at the ROI. The resulting SOURCE has the filters that i need, but a lower resolution and therefore different voxel indices than SOURCEi. So i need to take the head coordinates i found for SOURCEi and identify the corresponding grid locations in SOURCE . For this i only found a crude solution where i, within the SOURCE.pos field, search for the triplet that produces the smallest squared difference to the MNI coordinates of my ROI in SOURCEi. The matrix subscripts for that triplet give the best fitting grid location for my desired ROI, and the corresponding index is pointing to my desired filter: 

indx = find((((SOURCE.pos(:,1)-headcoords_SOURCEi(1)).^2) + ((SOURCE.pos(:,2)-headcoords_SOURCEi(2)).^2) +  
((SOURCE.pos(:,3)-headcoords_SOURCEi(3)).^2)) == min  (((SOURCE.pos(:,1)-headcoords_SOURCEi(1)).^2) + ((SOURCE.pos(:,2)-headcoords_SOURCEi(2)).^2) + ((SOURCE.pos(:,3)-headcoords_SOURCEi(3)).^2))); % assume that ROI is a single source location, 1*3 vector 

[xvox, yvox, zvox] = ind2sub(SOURCE.dim, indx); 
ROI_filter   = SOURCE.avg.filter{indx}; 

I am very unsure with these last lines of code. Is it true that SOURCE.pos holds MNI coordinates (for the code would be useless if not)? Or is there an easier solution that i am not aware of yet? Any comments would be greatly appreciated. 

Best regards, 
Gregor 
-- 
Dr. rer. nat. Gregor Volberg <gregor.volberg at psychologie.uni-regensburg.de> ( mailto:gregor.volberg at psychologie.uni-regensburg.de )
University of Regensburg
Institute for Experimental Psychology
93040 Regensburg, Germany
Tel: +49 941 943 3862 
Fax: +49 941 943 3233
http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110217/cd00cbbf/attachment-0001.html>


More information about the fieldtrip mailing list