[FieldTrip] reverse source interpolate?

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Wed Jun 27 18:27:16 CEST 2012


Hi Cornelius,

There is no need to 'uninterpolate' because the coordinates are already expressed in the correct coordinate system. What you probably want is to find the index to the voxel in the original source-structure closest to your 'hotspot' in the interpolated image.
This can be achieved by something like this:

write down the coordinates of your favourite position in the interpolated image (in world coordinates, here I assume that you are still in MEG coordinate system and have not normalized to MNI space), call this pos

pos = pos./10 (from mm to cm)

dpos = source.pos - repmat(pos, size(source.pos,1),1);
[m,ind] = min(sum(dpos.^2,2));

source is the original source structure.
ind is the index you are looking for.

If you have interpolate to the MNI-template grid you need to replace the source.pos with the set of grid positions from your template grid (i.e. expressed in MNI coordinates).


Cheers,

JM


On Jun 27, 2012, at 5:26 PM, cornelius abel wrote:

> Hello,
> 
> does anybody know how to get the uninterpolated source position giving the coordinates aquired after interpolation with an anatomy.
> In principle i want to get an individual source time course at the position i picked from the interpolated grand average source plot. Therfore i need the corresponding filter and its position in the source structure.
> 
> I tried to get the position by applying the inverse transformation matrix of the used anatomy like:
> pos_before_interpolation=warp_apply(inv(anatomy.transform), position_after_interpolation);
> 
> but that did not give usefull results :(
> 
> Any ideas how it could be done?
> 
> Greetings, Cornelius
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jan-Mathijs Schoffelen, MD PhD 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

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


More information about the fieldtrip mailing list