arr = plt.imread('mri_demo.png')
values = colormap2arr(arr, cm.jet)
plt.imshow(values, interpolation='bilinear', cmap=cm.jet, origin='lower',
    extent=[-3, 3, -3, 3])
plt.show()
how to reverse color map image to scalar values