def plot_registration(anat_nii, div_id, plot_params=None, order=('z', 'x',
    'y'), cuts=None, estimate_brightness=False, label=None, contour=None,
    compress='auto', overlay=None, overlay_params=None):
    """
    Plot the foreground and background views.

    Default order is: axial, coronal, sagittal
    """
    from uuid import uuid4
    from lxml import etree
    import matplotlib.pyplot as plt
    from nilearn.plotting import plot_anat
    from svgutils.transform import SVGFigure
    from niworkflows.viz.utils import robust_set_limits, extract_svg, SVGNS
    plot_params = plot_params or {}
    if cuts is None:
        raise NotImplementedError
    out_files = []
    if estimate_brightness:
        plot_params = robust_set_limits(anat_nii.get_fdata(dtype='float32')
            .reshape(-1), plot_params)
    for i, mode in enumerate(list(order)):
        plot_params['display_mode'] = mode
        plot_params['cut_coords'] = cuts[mode]
        if i == 0:
            plot_params['title'] = label
        else:
            plot_params['title'] = None
        display = plot_anat(anat_nii, **plot_params)
        if overlay is not None:
            _overlay_params = {'vmin': overlay.get_fdata(dtype='float32').
                min(), 'vmax': overlay.get_fdata(dtype='float32').max(),
                'cmap': plt.cm.gray, 'interpolation': 'nearest'}
            _overlay_params.update(overlay_params)
            display.add_overlay(overlay, **_overlay_params)
        if contour is not None:
            display.add_contours(contour, colors='g', levels=[0.5],
                linewidths=0.5)
        svg = extract_svg(display, compress=compress)
        display.close()
        xml_data = etree.fromstring(svg)
        find_text = etree.ETXPath("//{%s}g[@id='figure_1']" % SVGNS)
        find_text(xml_data)[0].set('id', '%s-%s-%s' % (div_id, mode, uuid4()))
        svg_fig = SVGFigure()
        svg_fig.root = xml_data
        out_files.append(svg_fig)
    return out_files
