def brain_to_mpl(brain):
 tmp_path = op.abspath(op.join(op.curdir, 'my_tmp'))
 brain.save_imageset(tmp_path, views=['ven'])
 im = imread((tmp_path + '_ven.png'))
 os.remove((tmp_path + '_ven.png'))
 return im

def brain_to_mpl ( brain ) : tmp_path = op . abspath ( op . join ( op . curdir , 'my_tmp' ) ) brain . save_imageset ( tmp_path , views = [ 'ven' ] ) im = imread ( ( tmp_path + '_ven.png' ) ) os . remove ( ( tmp_path + '_ven.png' ) ) return im
convert image to be usable with matplotlib .