it seem you are printing the dummy image in the data loader. But you can load the nifty file with many method i am showing one tham below
def process_key(event):
    fig = event.canvas.figure
    ax = fig.axes[0]
    if event.key == 'a':
        previous_slice(ax)
    elif event.key == 'q':
        next_slice(ax)
    fig.canvas.draw()

def multi_slice_viewer(volume):
    fig, ax = plt.subplots()
    ax.volume = volume
    ax.index =60
    ax.imshow(volume[ax.index],cmap='gray')
    fig.canvas.mpl_connect('key_press_event', process_key)
data_dir='directory'                                             #image directory
img=nib.load(os.path.join(data_dir,'niftyfile_name.nii'))                           #loading the image
img_data=img.get_data()                                                     #accessing image array
#multi_slice_viewer(img_data)
#plt.show()
#plt.imshow(img_data[75])
print(img_data.shape)
plt.imshow(img_data[75], aspect=1)
#for img_data
plt.imshow(img_data[75])


#How to print slice of the 3D numpy array
a=img_data
a[10:,:,50]