View_img showing gaps/ holes in bg_img

I’m plotting with view_img in my first Jupyter notebook. For some reason, the bg_img is showing up with what appear to be holes or gaps along the midline of the brain.

At first I thought it was an issue with my stat_map_img. But, I now think it’s an issue with the bg_img because when I set black_bg to True or False, the gaps/holes changed with the color of the background.

I also tried using just the default bg_img=‘MNI152’ and bg_img=False and the issue persisted.
Does anyone know why this is happening and how to fix it?

Hi @mbrucato I think you’re issue may be related to this #3120. I am also wondering is your image data in MNI space or not? And can you also let me know what version of nilearn you are using?

Hi @ymzayek, thanks for your reply. Yes, my image is in MNI152_2mm space. I am using nilearn v.0.9.1

@jeromedockes perhaps you have some idea about this? I am not sure how to reconcile this with the conclusions from the open issue I linked above.

I’m not sure either. I’ll mark your previous reply as the solution and then stay posted to see if they resolve the issue in that thread. Thanks

yes if we get rid of masking the background image, or reduce the threshold for the mni template and remove masking for all other images, as suggested in the linked issue, it will resolve this problem as well

will be adressed in [FIX] do not mask view_img background with MNI brain mask by jeromedockes · Pull Request #3312 · nilearn/nilearn · GitHub