Hello,
I have been struggling overlaying a self defined ROI on a brain surface with a statistical map. For my analysis I need to mask left DLPFC area (representing correlations), which I have done
Next, I would like to add a spherical ROI on this image at a specific coordinate. It sort of works on 2D image
But I get weird results plotting it on a mesh
The code I have used:
masked_data = apply_mask(seedmap_img, dlpfc_image)
masked_img = unmask(masked_data, dlpfc_image)
texture = surface.vol_to_surf(masked_img, struct_surf)
roi_map = roi_img.get_fdata()
from nilearn.surface import vol_to_surf
roi_surf = vol_to_surf(roi_img,surf_mesh=struct_surf)
figure=plot_surf_stat_map(
struct_surf, texture,
hemi='left',
view='lateral',
colorbar=True,
alpha=1,
threshold=None,
cmap='cold_hot',
bg_on_data=False,
)
plot_surf_roi(
surf_mesh = struct_surf,
roi_map = roi_surf,
bg_map = texture,
threshold=None,
figure=figure,
bg_on_data=True,
)
plt.show()
I have tried changing or deleting plot_surf_stat_map and plot_surf_roi arguments, but this is the best image I got so far. Does anyone know how to get the desired overlay?
Best,
Vytautas