Plotting results of conjunction analysis using nilearn

Dear all,

Summary of what happened:

I have two the results from two contrasts that I would like to show on a cortical surface along with a third overlay representing the conjunction of the two. This is nicely demonstrated as an example on the PySurfer webpage.

Is it possible to use nilearn in order to show multiple overlays simultaneously on a cortical surface? If so, how would I go about it? This example from nilearn is getting close but I can’t get it to show two contrasts at the same time (see code below).

The reason I’m asking how to do this in nilearn is that, unfortunately, the PySurfer code that accompanies the example shown at the top does not produce any nice result and suffers from severe artifacts making the overlays look very speckled.

Thanks & best,
Michael

Command used (and if a helper script was used, a link to the helper script or the command generated):

This code does not plot two overlays on the same surface.

from nilearn import datasets

motor_images = datasets.fetch_neurovault_motor_task()
stat_img = motor_images.images[0]

audio_images = datasets.fetch_neurovault_auditory_computation_task()
stat_img2 = audio_images.images[0]

fsaverage = datasets.fetch_surf_fsaverage()

from nilearn import surface

# motor task overlay
texture = surface.vol_to_surf(stat_img, fsaverage.pial_right)

# audio task overlay
texture2 = surface.vol_to_surf(stat_img2, fsaverage.pial_right)

from nilearn import plotting

fig = plotting.plot_surf_stat_map(
    fsaverage.infl_right, texture, hemi='right',
    title='Surface right hemisphere', colorbar=True,
    threshold=1., bg_map=fsaverage.sulc_right
)

fig = plotting.plot_surf_stat_map(
    fsaverage.infl_right, texture2, hemi='right',
    title='Surface right hemisphere', colorbar=True,
    threshold=1., bg_map=fsaverage.sulc_right,
    figure=fig
    
)

fig.show()

Version:

nilearn==0.9.2

Environment (Docker, Singularity, custom installation):

Docker image “nipype/nipype:py38”

Data formatted according to a validatable standard? Please provide the output of the validator:

Example datasets from Neurovault

Relevant log outputs (up to 20 lines):

Screenshots / relevant information: