'Render one slice of mri without bem as a PNG.'

def _render_image_png(self, image, cmap='gray', n_jobs=1):

    import nibabel as nib
    global_id = self._get_id()
    if ('mri' not in self.sections):
        self.sections.append('mri')
        self._sectionvars['mri'] = 'mri'
    nim = nib.load(image)
    data = nim.get_data()
    shape = data.shape
    limits = {'sagittal': range(0, shape[0], 2), 'axial': range(0, shape[1], 2), 'coronal': range(0, shape[2], 2)}
    name = op.basename(image)
    html = (u'<li    class="mri"    id="%d">\n' % global_id)
    html += (u'<h2>%s</h2>\n' % name)
    html += self._render_array(data, global_id=global_id, cmap=cmap, limits=limits, n_jobs=n_jobs)
    html += u'</li>\n'
    return html
