Scout index - rearranging/reordering scouts

Hi @Francois,

I have completed my source level analysis. I have some dozen scouts (ROIs) on which I run connectivity analysis (output is a NxN matrix). I export this file into matlab for visualisation.
I have a number of these files and what I am interested in doing is to rearrange the scouts (that I originally defined) that will make my visualisation a bit more intuitive.
Is there an easy way of doing this in Brainstorm?

One way that I can think of is obviously redefine the scouts in the order that I want and re-run the connectivity analysis. But if I was able to rearrange their order in scout window, then that will save me the time of redefining them (and potential new errors).

Please let me know if you have a solution.


Sorry for the response delay...

You can write a Matlab script to edit the file structures manually.
You need to rearrange the indices of the following matrices: TF, RefRowNames, RowNames, Atlas.Scouts.

If the TF matrix is symmetrical and compressed, you need to unpack it first, reorder both rows and columns, and repack it again, as explained here:
How the Corr matix is saved?

For getting started with Brainstorm scripting:

Please let me know if you need additional details.

1 Like