def _json_view_params(shape, affine, vmin, vmax, cut_slices, black_bg=False,
    opacity=1, draw_cross=True, annotate=True, title=None, colorbar=True,
    value=True):
    """ Create a dictionary with all the brainsprite parameters.
        Returns: params
    """
    if black_bg:
        cfont = '#FFFFFF'
        cbg = '#000000'
    else:
        cfont = '#000000'
        cbg = '#FFFFFF'
    if type(vmin).__module__ == 'numpy':
        vmin = vmin.tolist()
    if type(vmax).__module__ == 'numpy':
        vmax = vmax.tolist()
    params = {'canvas': '3Dviewer', 'sprite': 'spriteImg', 'nbSlice': {'X':
        shape[0], 'Y': shape[1], 'Z': shape[2]}, 'overlay': {'sprite':
        'overlayImg', 'nbSlice': {'X': shape[0], 'Y': shape[1], 'Z': shape[
        2]}, 'opacity': opacity}, 'colorBackground': cbg, 'colorFont':
        cfont, 'crosshair': draw_cross, 'affine': affine.tolist(),
        'flagCoordinates': annotate, 'title': title, 'flagValue': value,
        'numSlice': {'X': cut_slices[0] - 1, 'Y': cut_slices[1] - 1, 'Z': 
        cut_slices[2] - 1}}
    if colorbar:
        params['colorMap'] = {'img': 'colorMap', 'min': vmin, 'max': vmax}
    return params
