'Render one axis of bem contours (only PNG).'

def _render_one_bem_axis(self, mri_fname, surf_fnames, global_id, shape, orientation='coronal', decim=2, n_jobs=1):

    orientation_name2axis = dict(sagittal=0, axial=1, coronal=2)
    orientation_axis = orientation_name2axis[orientation]
    n_slices = shape[orientation_axis]
    orig_size = np.roll(shape, orientation_axis)[[1, 2]]
    name = orientation
    html = []
    html.append(u'<div    class="col-xs-6    col-md-4">')
    slides_klass = ('%s-%s' % (name, global_id))
    sl = np.arange(0, n_slices, decim)
    kwargs = dict(mri_fname=mri_fname, surf_fnames=surf_fnames, show=False, orientation=orientation, img_output=orig_size)
    imgs = _figs_to_mrislices(sl, n_jobs, **kwargs)
    slices = []
    img_klass = ('slideimg-%s' % name)
    div_klass = ('span12    %s' % slides_klass)
    for (ii, img) in enumerate(imgs):
        slice_id = ('%s-%s-%s' % (name, global_id, sl[ii]))
        caption = (u'Slice    %s    %s' % (name, sl[ii]))
        first = (True if (ii == 0) else False)
        slices.append(_build_html_image(img, slice_id, div_klass, img_klass, caption, first, image_format='png'))
    slider_id = ('select-%s-%s' % (name, global_id))
    html.append((u'<div    id="%s"></div>' % slider_id))
    html.append(u'<ul    class="thumbnails">')
    html.append(u'\n'.join(slices))
    html.append(u'</ul>')
    html.append(_build_html_slider(sl, slides_klass, slider_id))
    html.append(u'</div>')
    return '\n'.join(html)
