Generic mixer to process two slices with appropriate mixer
        and return the composite to be displayed.

def _generic_mixer(slice1, slice2, mixer_name, **kwargs):
    """
    Generic mixer to process two slices with appropriate mixer
        and return the composite to be displayed.
    """

    mixer_name = mixer_name.lower()
    if mixer_name in ['color_mix', 'rgb']:
        mixed = _mix_color(slice1, slice2, **kwargs)
        cmap = None  # data is already RGB-ed
    elif mixer_name in ['checkerboard', 'checker', 'cb', 'checker_board']:
        checkers = _get_checkers(slice1.shape, **kwargs)
        mixed = _checker_mixer(slice1, slice2, checkers)
        cmap = 'gray'
    elif mixer_name in ['diff', 'voxelwise_diff', 'vdiff']:

        mixed, cmap = _diff_image(slice1, slice2, **kwargs)
        # if kwargs['overlay_image'] is True:
        #     diff_cmap = diff_colormap()
        #     plt.imshow(slice1, alpha=kwargs['overlay_alpha'], **display_params)
        #     plt.hold(True)
        #     plt.imshow(mixed,
        #                cmap=diff_cmap,
        #                vmin=min_value, vmax=max_value,
        #                **display_params)
        # else:
        #     plt.imshow(mixed, cmap=cmap,
        #                vmin=min_value, vmax=max_value,
        #                **display_params)

    else:
        raise ValueError('Invalid mixer name chosen.')

    disp_params = dict(cmap=cmap)

    return mixed, disp_params