from nilearn.plotting import plot_prob_atlas
print(canica_components_img.shape)
print(canica_components_img)
# Plot all ICA components together
plot_prob_atlas(canica_components_img, title='All ICA components')
用nilearn里的ICA生成fMRI激活区域用nilearn里的ICA功能生成fMRI激活区域
五、按切片显示激活区域
from nilearn.image import iter_img
from nilearn.plotting import plot_stat_map, show
for i, cur_img in enumerate(iter_img(canica_components_img)):
plot_stat_map(cur_img, display_mode="z", title="IC %d" % i,
cut_coords=1, colorbar=False)