Select deep structures/cerebellum in script

Hi,
I'm interested in creating an MRI volume head model with the cerebellum, and scripting it.
I found this very helpful tutorial on how to create a new surface: http://neuroimage.usc.edu/brainstorm/Tutorials/DeepAtlas#Source_estimation

Using the GUI:
I successfully created a cortex+cerebellum surface by following the tutorial, computed the head model for an MRI volume, and computed sources. This gives a nice source localization that includes the entire cortex as well as the cerebellum. This is perfect and exactly what I want to do, but I want to script it.

Using Scripts:
I'm having trouble merging the cortex with the cerebellum. I can import anatomy, compute the head model, and compute sources but for the cortex only. I don't know what to do in order to merge the cortex ans cerebellum. See code below.
Any help is appreciated!
Thanks,
Elizabeth

I'm importing anatomy:
% Process: Import anatomy folder
sFiles = bst_process('CallProcess', 'process_import_anatomy', sFiles, [], ...
'subjectname', SubjectName.Name, ...
'mrifile', {FsDir, 'FreeSurfer'}, ...
'nvertices', 15000, ...;
'nas', NAS, ...
'lpa', LPA, ...
'rpa', RPA, ...
'ac', AC, ...
'pc', PC, ...
'ih', IH;

This is where I think the cerebellum should be added, but I don't know what code to use

Then I compute the head model:
% Process: Compute head model
sFiles = bst_process('CallProcess', 'process_headmodel', sFiles, [], ...
'Comment', '', ...
'sourcespace', 2, ... % 1 Cortex surface; 2 = MRI volume
'volumegrid', [], ...
'meg', 3, ... % Overlapping spheres
'eeg', 1, ... %
'ecog', 1, ... %
'seeg', 1, ... %
'openmeeg', struct(...
'BemFiles', {{}}, ...
'BemNames', {{'Scalp', 'Skull', 'Brain'}}, ...
'BemCond', [1, 0.0125, 1], ...
'BemSelect', [1, 1, 1], ...
'isAdjoint', 0, ...
'isAdaptative', 1, ...
'isSplit', 0, ...
'SplitLength', 4000));

This is now done automatically when importing the anatomy from a FreeSurfer folder: the menu “Import anatomy folder” creates a surface “cortex_cereb” which contains the cortex and the cerebellum.

The function that does it is here:

1 Like

Hi Francois,

Is it possible to generate the surface “cortex_cereb” directly from Brainstorm without using FreeSurfer? For few patients, I cannot generate the anatomy folder using FreeSurfer, so what I did is to import the MRI of the patient and use CAT12 from Brainstorm to generate the surface "cortex", which in this case contains only the cortex without the cerebellum. Then, I used the "aseg atlas" from the default anatomy and combined it with the generated cortex from CAT12. In this way, it generated a surface similar to "cortex_cereb", but its representation is not ideal. If Brainstorm can generate "cortex_cereb" without FreeSurfer, is there a way to do it without using the default anatomy?

Thank you.

Then, I used the "aseg atlas" from the default anatomy and combined it with the generated cortex from CAT12.

This is definitely not a good idea.

If Brainstorm can generate "cortex_cereb" without FreeSurfer, is there a way to do it without using the default anatomy?

I added a new menu "Create surfaces", when you right-click on an atlas: Anatomy: Create surfaces from MRI volume atlas · brainstorm-tools/brainstorm3@efb5c4a · GitHub

  • Start by updating Brainstorm.
  • After the CAT12 segmentation (generating the volume atlases), right-click on the volume atlas lpba40 > Create surfaces.
  • OPTIONAL: Downsample the new surface file lpba40 (it depends how many sources you want there)
  • Double-click on the new surface file lpba40
  • In the Scout tab, select atlas "Structures" in the drop-down menu
  • In the 3D figure, click on the cerebellum, it should select the scout Bothside Cerebellar Lobe
  • In the Scout panel, with this scout selected, select menu Scout > Edit surface > Keep only selected scout
  • In the database explorer, select simultaneously the last surface created and the cortex you want to use for source estimation, right-click > Merge surfaces

image image

Note that this is not a realistic surface. It can be interesting in a surface-based source model to add dipoles in the cerebellum to be able to represent sources coming from the cerebellum and/or from the neck muscles (e.g. Tutorials/RestingOmega - Brainstorm) in order to reconstruct cleaner activity on the cerebrum cortex. However, this surface is not adapted to represent correctly the activity of the cerebellum, as it does not include dipoles inside the cerebellum.

If you are interested specifically in the activity of the cerebellum, you might prefer using a volume source model.
https://neuroimage.usc.edu/brainstorm/Tutorials/TutVolSource

2 Likes

Than you so much for the answer. This is exactly what I wanted to do. Before, I had the 9June version so I was not able to see the new "Create surfaces" option, but I just downloaded the new version and followed all the steps that you just mentioned. It works! I was planning to do a source-localization analysis to compute then FC at the "global level" using ROIs of the AAL3 as scouts. The AAL3 has more ROIs compared to the volume atlas lpba40, so probably I will consider not only the scout Bothside Cerebellar Lobe, but also other regions as well. Is there a particular reason why is it preferable to create the surfaces from the volume atlas lpba40 or not?

Thank you in advance!

In order to use the AAL3 regions as scouts, you should compute a volume source model and use the AAL3 parcellation as a "volume atlas". You don't need to add the cerebellum to the surface for this, what you is discussed above and this new menu I implemented are off-topic. Do not try to use volume parcellations as scouts on surface-based source maps.
Tutorials/TutVolSource - Brainstorm

Is there a particular reason why is it preferable to create the surfaces from the volume atlas lpba40 or not?

LPBA40 includes a single region for the entire cerebellum, making it possible to use it to create an envelope surface for the cerebellum easily, which was your initial request. But this is not adapted for scout analysis of source maps.

Yes, this is exactly what I used to do. The question at the beginning was related to the fact that for those subjects in which I did not have the FreeSurfer anatomy folder I wanted to check the source grid from the volume source model generated on the entire "cortex_cereb" surface, like this example:

But without this type of "cortex_cereb" surface set as default in the anatomy, I was not able to do it.

Thank you again for your help.

I see... the other option was only "full head", which is not the same.

1 Like