Siibra: Code to calculate maximum probability maps

Hi siibra developers,

I have a straight-forward question:
Would it be possible to provide, either as a function in siibra-python or separately, code to reproduce the maximum probability maps of the Juelich Brain Atlas?
If this is already available, I’d be super happy about a pointer!

Specifically, I might obtain the individual region-wise probability maps via the ebrains portal or via siibra. In a simplistic approach, I could now concatenate all 3d images across a 4th dimension and assign to each 3d voxel the index in the 4th dimension with the highest probability value (in Python +1).
Except for the label numbering, this results in a maximum probability map that is similar, but not equal, to the “official” one. E.g., I assume that there is a minimum probability a voxel needs to have to get assigned any label, that there will be a general mask in which voxels are assigned labels, and, most importantly, there needs to be a process to ensure final regions are connected components according to some definition.

I am asking with two motivations in mind: First, I am experimenting with “filling” the gap maps of the JBA with probabilistically defined regions from other parcellations. Second, I was trying to map surface parcellations into volume space via maximum probability projections of smoothed individual region masks. The latter might be a reasonable way to “inflate” the tight-ribbon cortex parcellations you get from direct surface-to-volume transformation via FreeSurfer.

Thanks a lot!
Best,

Leon

Dear @leondlotter , siibra itself does not contain the code for the calculation probabilistic map based on MPM.

I can find in the data descriptor, located in EBRAINS - Knowledge Graph Search (doi 10.25493/KNSN-XB4 ) that Hartmut Mohlberg is responsible for “Calculation of probabilistic maps and MPMs”. I would imagine he would be the right person to contact about the methodologies.

In the same data descriptor, it also made mention of code available at the original publication (doi: 10.1126/science.abb4588 ) - I would imagine in in the form of supplementary materials.

Lastly - while not exactly related to your question - if you are interested the probabilistic value at specific physical coordinate(s)/ voxel coordinate(s), rather than loading all probabistlic maps in memory, siibra-python provides an efficient assign point method Assigning coordinates to brain regions — siibra-python documentation . We use an alternative data structure to minimize the memory usage, while maintaining satisfactory performance