Percent Inflation in SUMA


I’m working on a project that compares activation as measured by MEG compared to fMRI (I’m on the fMRI end). The MEG data has been processed and projected onto a surface through Brainstorm while the fMRI data has been processed in SPM then projected through SUMA.

In order to make the distinction between the two methods as obvious as possible, we are trying to make the cortical surfaces appear as similarly as possible, so that when the data is laid on top, it is clear what is different and what is the same between them. The biggest difference right now is our regions of interest and percent inflation, simply due to the nuances of the separate programs we are using. So, I have two questions:

  1. Is there a way to adjust the amount of inflation of the inflated state surface somewhere between the default completely inflated and partially inflated? The partially inflated state that already exists hides our ROI from certain angles, but the completely inflated state makes it difficult to orient yourself between the two surfaces. Is there a variable somewhere that can be altered?

  2. An obvious newbie question: how can you use a .roi file to only display data points within the ROI?

Any guidance is very much appreciated!

Hi, Veronica-

Re. Q1: Well, I am not aware of a method for changing the meshes in that way. I guess BrainStorm has some specific meshes that it produces, then? I don’t know if MapIcosahedron would translate that to a standard mesh; I have never used that program.

Re. Q2: Yes, you can convert your ROI points into a surface dataset, and then apply that as a mask.
In the AFNI Bootcamp data set, there is a demo of doing part of this. If you don’t have a copy of the Bootcamp demo dataset, then you can download it as described here (and under any setup instructions):

curl -O
tar xvzf CD.tgz
cd CD
tcsh s2.cp.files . ~
cd ..

There is a relevant script/example in the subdirectory: AFNI_data6/FT_analysis/FT/SUMA/, called “run.roi2dset”. That provides an example of converting an ROI that was drawn using SUMA into a surface dset (*.niml.dset), which can be applied to a mask; the command is:

ROI2dataset -prefix $prefix.lh.niml.dset -input $prefix.lh.niml.roi

where “$prefix” is a variable that could be whatever you have chosen (in the script, the default is “tuna”, charmingly enough); you could also specify either of the hemisphere meshes equivalently (“rh” as well as the chosen “lh”).
The script goes on to demonstrated creating a volume from that new surface dset; but your question is about using that dset as a mask. You can apply it as a mask to another dset DSET2.lh.niml.dset via:

3dcalc -a $prefix.lh.niml.dset -b DSET2.lh.niml.dset -expr 'step(a)*b' -prefix OUTPUT.lh.niml.dset


Hello Veronica,

You can create your own semi-inflated surfaces when you run @SUMA_Make_Spec_FS with the -inflate option. By default the script uses -inflate 200, try adding -inflate 250 and -inflate 300 and see how that works for you.

If you want to do this manually, which would be much faster, look at the code for @SUMA_Make_Spec_FS in the block starting with comment: #and make semi inflated surfaces.
You can also look at the example in the help output for -inflate option.


Thank you so much! This is really helpful.

That worked like a charm. Thank you so much!