[FieldTrip] AAL atlas Anatomical parcellation

Mohammad Ostadmohammadi mohammad.ostad73 at gmail.com
Mon Jul 15 11:37:30 CEST 2019


function [parcel_out, labels] = parcellate(template, atlas)

    atlas = ft_convert_units(atlas,'cm');
    wanted_parcels = [1, 2, 19, 20, 29, 30, 57, 58];

    for i = 1:length(wanted_parcels)
        cfg            = [];
        cfg.atlas      = atlas;
        cfg.roi        = atlas.tissuelabel{wanted_parcels(i)};
        labels{i}      = atlas.tissuelabel{wanted_parcels(i)};
        cfg.inputcoord = atlas.coordsys;
        tmp_mask       = ft_volumelookup(cfg,template);
        tmp_mask       = reshape(tmp_mask, [numel(tmp_mask), 1]);
        inside_parcels = tmp_mask .* template.inside;
        source_indexes = find(inside_parcels);
        parcel_out{i}  = source_indexes;
    end

end

-----------------------------------------------------------------

atlas   =
ft_read_atlas('fieldtrip-20181025/template/atlas/aal/ROI_MNI_V4.nii');
atlas   = ft_convert_units(atlas,'cm');
[parcels, labels] = parcellate(sourcemodel, atlas);



On Mon, Jul 15, 2019 at 2:05 PM Velden, Daniel <
daniel.velden at med.uni-goettingen.de> wrote:

> Hi Mohammad,
>
>
>
> based on your code it’s hard to tell a thing. Would you please provide us
> with more of your code to evaluate your problem.
>
>
>
> Greetings
>
> Daniel van de Velden
>
>
>
> ------------------------------------------------
>
>
>
> *Daniel van de Velden (M.Sc.) || PhD candidate*
>
> *Wissenschaftlicher Mitarbeiter*
>
> *Klinik für Klinische Neurophysiologie *
>
> *Georg-August-Universität Göttingen*
>
> *Robert-Koch.Str. 40, 37075 Göttingen*
>
> *Tel. 0551- 39-65106*
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190715/62593830/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list