I wanted to plot a few of the regions from AAL atlas. I ran the following code but it gives an error that the map is not 4D. Is there any way to fix this?
Code:
dataset = datasets.fetch_atlas_aal()
maps=dataset.maps
display = plotting.plot_stat_map(image.index_img(maps, 6),colorbar=False)
Error :
raise DimensionError(len(niimg.shape), ensure_ndim)
nilearn._utils.exceptions.DimensionError: Input data has incompatible dimensionality: Expected dimension is 4D and you provided a 3D image. See http://nilearn.github.io/manipulating_images/input_output.html.