[FieldTrip] anatomical labelling of dipole positions

Eelke Spaak eelke.spaak at donders.ru.nl
Wed Aug 27 10:52:38 CEST 2014


Hi Tom,

Let me split your post into two questions: (1) how to compute voxel
indices from known anatomical coordinates? (2) how to get an
anatomical label for a known coordinate?

(1) Any volumetric data should have a .transform matrix attached to
it. This matrix describes the linear transformation needed to get
*from* voxel indices *to* anatomical coordinates. (The type of
coordinates the matrix projects to is described by the .coordsys
field.). To go the other way, from anatomical coordinates to voxel
indices, you just apply the inverse transformation (the round() is
needed to get exact integers, otherwise matlab complains):

voxinds = round(ft_warp_apply(pinv(mri.transform), mnipos));

(2) There is a function private/atlas_lookup.m that takes an atlas
structure and a 1x3 position and returns the anatomical label. So
there is no need to go through the creation of the mask etc. (and the
answer to (1) becomes irrelevant in this instance, though still good
to know :) ). This very straightforward functionality should actually
be merged into ft_volumelookup and atlas_lookup needs to be
deprecated, however for now the function is still very useful.

Best,
Eelke

On 26 August 2014 18:38, Tom Marshall <t.marshall at fcdonders.ru.nl> wrote:
> Hi Eelke,
>
> Fantastic! I'm now almost where I want to be...
>
> Now I have the MNI co-ordinate, and plotting:
>
> cfg=[];
> cfg.location=mnipos;
> cfg.locationcoordinates='head';
> cfg.atlas='/home/common/matlab/fieldtrip/template/atlas/aal/ROI_MNI_V4.nii';
> cfg.funparameter='anatomy';
> ft_sourceplot(cfg,normalised);
>
> Gives me the plot with the dipole position where I expect it (based on where
> it was pre-warping) and an anatomical label from the AAL atlas. So far so
> good.
>
> I'd like to go one better though, and directly look up the label from the
> atlas. ft_volumelookup returns an anatomical label if you give it a binary
> mask, so I could try to create a volume-sized mask full of zeroes with a
> single 1 at 'mnipos'. However, mnipos is an MNI co-ordinate, and I would
> need to specify the 1 in voxel co-ordinates (ie, as an index in the matrix
> rather than a co-ordinate which could be -ve). How to convert the
> co-ordinate?
>
> Best,
> Tom
>
>
> On 8/26/2014 6:03 PM, Eelke Spaak wrote:
>>
>> Hi Tom,
>>
>> ft_volumenormalise will allow you to normalise an anatomical volume to
>> MNI space. The output of ft_volumenormalise will have a .params and
>> .initial field. These you need, you can discard the actual normalised
>> volumetric data. The fields contain the linear (.initial) and
>> nonlinear (.params) warps needed to go from subject-specific to MNI
>> space, and vice versa. Using these you can do something like:
>>
>> normalised = ft_volumenormalise([], mri);
>> mnipos = ft_warp_apply(normalised.params,
>> ft_warp_apply(normalised.initial, subjectpos), 'individual2sn');
>>
>> where subjectpos is an Nx3 array of subject-specific coordinates, and
>> mnipos will of course be Nx3 in MNI space.
>>
>> In case of questions we can discuss tomorrow in person :)
>>
>> Best,
>> Eelke
>>
>> On 26 August 2014 17:49, Tom Marshall <t.marshall at fcdonders.ru.nl> wrote:
>>>
>>> Hi Trippers,
>>>
>>> I have performed dipole fitting on some data and I would like to identify
>>> the anatomical regions in which various dipoles are located - ie, to make
>>> statements of the sort, 'dipole X was (best) localised to the right
>>> superior
>>> parietal cortex'. Specifically - I have the output from ft_dipolefitting
>>> which gives positions in the head space of the individual subjects, and I
>>> would like to anatomically label the dipoles according to the AAL atlas,
>>> which is based on the MNI template brain.
>>>
>>> I *think* what I will need to do is apply some warping of the subject MRI
>>> to
>>> the MNI template, and then apply the same warping to the dipole
>>> co-ordinate.
>>> However it is not clear to me how to warp a single point, rather than an
>>> entire volume. Is there some fieldtrip function that could be used for
>>> this?
>>>
>>> I do not think the approach detailed in
>>>
>>> <http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space>
>>> will be much use here, since (if I understand correctly) the MNI-aligned
>>> grid created here would only be used as a starting point for
>>> ft_dipolefitting. In the end a given dipole might not correspond to any
>>> grid
>>> point.
>>>
>>> Can anybody advise me on how to set about this?
>>>
>>> Thanks a lot.
>>>
>>> Best,
>>> Tom
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



More information about the fieldtrip mailing list