Nilearn plotting coupled images


I’ve 2 related volumetric maps which I’d like to look at as a single unit. I was thinking of two views as in “view_img” but coupled i.e. when you move the coordinates of the higher map, the lower map moves accordingly.

Is that possible? If so, how? If not, what other alternatives may work for me?


1 Like

Hi @urielias !

This is not yet possible in Nilearn, but it is possible in the underlying brainsprite library that it calls: Unfortunately, I don’t know that there is an easy snippet of code that you can draw from as an example, here, though @pbellec will be the authority on this !

There are of course other viewers that allow for “yoking” two images – this thread might be helpful, here : Looking for image viewer that is capabale of opening multiple images at once

1 Like

Unfortunately the short answer is that it’s not really possible at the moment using python and brainsprite (the library underlying view_img).

brainsprite.js does support this feature though, and this dashboard gives an idea of how it works with html / js, but it’s probably (much) more involved than what you are looking for Report on functional connectivity maps

Hopefully this will be exposed with brainsprite through an easy python API at some point - but not in the near future.