How to import other brain atlases to use as scouts

I wish to import and apply another brain atlas, in my case the Yeo atlas based on fMRI. We have previously created individual subject FreeSurfer.annot files for several parcellations. Is is possible to bring these into BST? Alternatively, can we bring in the Yeo Atlas itself and apply it to the high-density Freesurfer mesh? I do not see any documentation on this, at least based on the titles of the tutorials.
-Jeff

1 Like

If you have annot files for a freesurfer surface:

  • import the surface (right-click on suject > Import surface): note that one annot file is a texture valid for only one surface file, you cannot load them on the full cortex processed by Brainstorm.
  • Open the surface (double-click): load the atlas for this surface with Atlas>Load atlas. Close the figure
  • if you import the hemispheres separately, you probably want to group them: select the two hemispheres, right-click > merge

I tried to import 3 other surfaces (created by someone who is not in the lab here any more) for one of my subjects and they all gave an mne error indicating a bad “magic” number. One of these was “lh.Yeo_singles.annot”. Since it is the same size as lh.aparc.annot and lh.aparc.a2009s.annot, I assumed it had the same number of vertices. These are the two files containing the Dest. and DK atlases that BST imports initially, correct?

Another problem is, I do not have matching surface files for any of the .annot files we have available here. I do have volume files, which I should be able to convert to surface files using FrSrf utilities.

I still have some confusion about terminology. Above you say to import the surface, but refer to the .annot file in the FS label directory. FS surfaces are in the FS surf directory, including lh.pial. I also do not fully understand what you mean above with loading the atlas. What FS file is the Atlas here?

I will look at FS file definitions in more detail now while awaiting your next reply.

-Jeff

Files with the extension “annot” are surface-based label/texture/atlas files, they are NOT surfaces. They do not contain vertices and faces like the surface files, they contain one value (label) per vertex. They have to be matched to a surface file (lh.pial, rh.white, or any other file in the surf/ subfolder) if not they are useless.
To load the surface+atlas on lh.pial: import surface “lh.pial”, view it, in the scout tab, import atlas “lh.aparc.a2009s.annot”.

If you have questions regarding FreeSurfer, please post on the FreeSurfer mailing list:
https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSupport

I did read up on FrSrf file formats last night (especially annot and surf), and what you tell me here helps clarify some things. I am now thinking that my best bet may be to try to obtain the original Yeo atlas, which hopefully I can then use to create matching surface+annot combinations for my individual subjects. I am told we have matching surface+annot combinations already, but I have not found them yet.

To clarify, should I get the “magic” number error when I try to import one of our local annot files? Or do I always have to first import a matching surface file first?

Thanks,
-Jeff

You got this error because you are trying to import an annot file as a surface file. It is not the same file format.

I see that now, thanks.

We were able to find the appropriate surf and annot files and import first the left and then right pial surfaces followed by the Yeo annotations. I can merge the left and right pials into a cortex, but cannot quite figure out how to combine the two annotations into a single Atlas. Please advise me on that part.

Import lh.pial, load lh..annot from the scout tab.
Import rh.pial, load rh.
.annot from the scout tab.
Select imorted lh+rh surfaces, right-click > Merge.
This will combine the atlases of each hemisphere.

1 Like

Did not seem to work. Here is the detail of what I did:

new sub: test01
import MRI
import surf: /surf/lh.pial
display lh.pial
Scout:Load Atlas:Load Atlas /label\lh_Yeo.annot
close and clear

import surf: /surf/rh.pial
display rh.pial
Scout:Load Atlas:Load Atlas /label\rh_Yeo.annot
close and clear

select lh. and rh.pial
R-click, merge
produces “cortex”, sets as default
display cortex
Scout:User scouts: shows three choices:
lh_Yeo
Structures
rh_Yeo

I can apply lh or rh individually, but not together
Structures just shows two entries, one for each hemi.

Did I do something wrong above?

It would seem possible to merge the atlases by using the atlas editing, copy, paste tools, but I cannot get that to work so far.
-Jeff

After you import the altas, rename it to “Yeo” for each hemisphere.
Only atlases with the same names will be merged together.

1 Like

OK, that makes sense.
I discovered during this process that the “Import Freesurfer folder” does a little cleanup on the pial surfaces, resulting in a slightly reduced number of vertices. THis was throwing me off when I initially tried to import the Yeo atlases since they no longer matched. Thus I believe that if I want to use the local Yeo atlases I need to go back and manually import the MRIs and pial surfaces again, if I want to have the two built-in FS atlases as well as the Yeo atlas for my subjects. Does this sound right?

Thanks,
-Jeff

Yes, if you want to add custom atlases, you cannot use the menu “Import Freesurfer folder”, you have to import everything manually.
How do you get the Yeo atlas for the individual subjects?

A research assistant in our lab did it about 2 years ago using Freesurfer tools. I think you know the process: align each individual to the generic Yeo atlas on the sphere, then map to the individual cortex inflated to a sphere, then map back to the folder 3D cortex, then to the voxels if you need that as well. I hope to learn how to do this soon as I will have new subjects I will need to perform it on.

Another question comes to mind. Now that I have manually imported the Yeo atlas as well as Destrieux, Desikan-Killiany, Brodmann, and two others we have here, I want to subparcellate to use as a scout. But I have to do that for each individual, and they will not mecessarily match. What I really probably need to do is subparcellate in the general Yeo or other atlas space. So I presume I have to do that first in Freesurfer, using the FS parcellation tools, then create an individual subparcellation “labeling” before importing each individual into BST.

Indeed, the subdivisions of the atlas could be different for each subject if you do them in Brainstorm.
Your approach sounds correct.

At one time you told me you were planning to incorporate the Yeo atlas in BST? What is the status now?
-Jeff

The Yeo atlas distributed by the FreeSurfer developers has been available on the FSAverage brain for a while:
http://neuroimage.usc.edu/brainstorm/Tutorials/LabelFreeSurfer#FSAverage_template

FreeSurfer 5.3 does not generate individual versions of this Yeo atlas, so it’s not available on any other brain.
You can ask them if they are planning to integrate this atlas in the default FreeSurfer segmentation at some point.

OK, I will contact the FreeSurfer people on this.

Dear Francois,

I have a follow-up question on that. When we run freesurfer for segmentation, we do not indicate what number of vertices we should end up with, at least I run mines regarding how it was explained on brainstorm tutorial https://neuroimage.usc.edu/brainstorm/Tutorials/LabelFreeSurfer#FSAverage_template

Now I try to apply Schafer or Yeo's atlases onto my lh.pial as you describe here and I got message saying number of vertices are not matching! So question here is, you know we can define the number of vertices when we upload the freesurfer anatomy folder to brainstorm, would this make any effect on the number of vertices of already segmented surface files or does it only related to source reconstruction related definitions, I mean saying to Brainstorm how many of those vertices I want a dipole to be fitted? Sorry for asking this questions I really do not know how those things works in general really.
So do you think would it help us if I would identify the number of vertices let say as 10242 when I upload a freesurfer segmentation folder to brainstorm, so it changes the number of vertices on segmented file hence later on I can use fsaverage5 atlas? If not is there any other way of downsampling the number of vertices of our surface files to the one required for the atlas we would like to use? I would really appreciate if you could help me with that please.

Ps. I would have tried myself and see obviously but somehow I cannot upload freesurfer files to brainstorm, alhough I did before, which gives me very weird error which I do not understand the reason.
Thank you,

Isil

Now I try to apply Schafer or Yeo's atlases onto my lh.pial as you describe here and I got message saying number of vertices are not matching!

How are you proceeding?

we can define the number of vertices when we upload the freesurfer anatomy folder to brainstorm, would this make any effect on the number of vertices of already segmented surface files or does it only related to source reconstruction related definitions, I mean saying to Brainstorm how many of those vertices I want a dipole to be fitted?

Brainstorm imports the high-resolution surfaces generated by FreeSurfer, loads the atlases on top of them, and then downsamples the surfaces with Matlab's reducepatch function to get a reasonable number of dipoles for source reconstruction. The import procedure is detailed here, and these are the instructions you should refer to to load any additional atlas:
https://neuroimage.usc.edu/brainstorm/Tutorials/LabelFreeSurfer#Manual_import_of_the_anatomy

If not is there any other way of downsampling the number of vertices of our surface files to the one required for the atlas we would like to use? I would really appreciate if you could help me with that please.

You won't be able to do anything like this. You have to start with full resolution surfaces, import all the atlases, and then downsample.

The Schaefer 2018 atlases are available through the CAT12 segmentation:
https://neuroimage.usc.edu/brainstorm/Tutorials/SegCAT12#Cortical_parcellations
Hopefully you'll manage to make this work, it would be a lot easier for you to get these atlases for you subjects.

Hi Francois,

thank you very much for your reply. I upload the atlas label file as you described above in one of your replies to Jeff, or as it was described here https://neuroimage.usc.edu/brainstorm/Tutorials/LabelFreeSurfer#Manual_import_of_the_anatomy.

Apparently this application works with the annot/label files produced by Freesurfer during MR segmentation however I cannot make it work with any other atlas file outside the freesurfer segmentation folder. I attached the error message that I get if I try to upload that or any other Yeo atlas (the number of the mismatched vertices change depends on the atlas that I am trying to upload of course).

So my confusion, even though we didn't indicate the number of vertices during segmentation in freesurfer how my segmentation ended up with 134570 vertices hence it does not match the vertices of the atlas that I am trying to upload. And if I use CAT12 to run all the segmentation from the very begining, and choose 15000 vertices for the segmentation, so how come later on this segmentation could work with any Yeo atlas, whose vertices are different from 15000 vertices already but it fits somehow, but I cannot make it work manually. So does this mean, during segmentation there is a separage lh.pial files are produced for each of the default atlases anyways so they match with the annot file somehow, and since I am lacking this in my freesurfer segmentation hence I cannot upload any Yeo or Schafer atlas at all? I would really appreciate if you could give a bit more details about that please indeed. Because if I already have segmentations files are ready for all the subjects obtained with freesurfer and you know it takes ages to complete for a whole set of participants, and it would be really helpful if I can find a way to upload Yeo or Schafer atlas onto those segmentations.

Thank you very much in advance,

Kind regards

Isil