[FieldTrip] Import Freesurfer atlas to ft
Mikkel Vinding
mikkel at cnru.dk
Thu Dec 6 10:50:32 CET 2018
Dear Jan-Mathijs
Thank you for the answer. It worked!
Best regards
Mikkel
Mikkel C. Vinding
NatMEG, Karolinska Institutet
Nobels väg 9
171 77 Stockholm, Sweden
Email: mikkel.vinding at ki.se
On Tue, Dec 4, 2018 at 9:45 PM Schoffelen, J.M. (Jan Mathijs) <
jan.schoffelen at donders.ru.nl> wrote:
> Dear Mikkel,
>
> I did not look into it in detail, but from your description it seems that
> the code takes a wrong turn somewhere, and thinks that the fileformat is of
> type freesurfer_volume (and for this reason it ends up on a line that tries
> to use ft_read_mri). I read in the code that the default allocation of the
> fileformat based on an educated guess from the filename is implemented in
> a slightly clunky way. Soooo, perhaps you could try and overrule this
> default allocation by explicitly specifying it in your call to
> ft_read_atlas:
>
> ft_read_atlas({filename_annotation filename_mesh}, ‘format’,
> ‘freesurfer_*’);
>
> where the * should be the appropriate choice of ‘a2009s’ ‘aparc’, or ‘ba’.
>
> Best wishes,
> Jan-Mathijs
>
> On 4 Dec 2018, at 20:20, Mikkel Vinding <mikkel at cnru.dk> wrote:
>
> Dear FieldTrip list
>
>
> Has anyone here imported individual atlases from Freesurfer into
> FieldTrip? It should be possible with ft_read_atlas. From the documentation
> of ft_read_atlas:
>
>
> * For individual surface-based atlases from FreeSurfer, you should
> specify two *
> * filenames as a cell-array: the first points to the file that contains
> information*
> * with respect to the parcels' labels, the second points to the file that
> defines the*
> * mesh on which the parcellation is defined.*
>
>
> Ft_read_atlas require a struct containing the filename of the atlas file
> and the cortical surface/mesh. However, I keep getting errors that
> ft_read_atlas cannot read Freesurfers “annot” files: “ *unrecognized
> filetype 'freesurfer_annot'.*“ I get a similar error when I try to read
> Freesurfer “label” files.
>
>
> The problem seems to be because ft_read_atlas calls ft_read_mri which does
> not support the type 'freesurfer_annot'. My question is how to read in
> Freesurfer annotations or labels? Do I need to convert the Freesurfer files
> first or is there another step I need to do first? If anyone has managed to
> read Freesurfer labels in FieldTrip, I will be delighted to hear the answer.
>
>
> Best regards
> Mikkel
>
> Mikkel C. Vinding
> NatMEG, Karolinska Institutet
> Nobels väg 9
> 171 77 Stockholm, Sweden
> Email: mikkel.vinding at ki.se
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
> _______________________________________________
> 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/20181206/465160ce/attachment-0002.html>
More information about the fieldtrip
mailing list