def save_quality_control(self, plane='sagittal', n_slices=1, seg=None, thr=0, cmap_col='red', format='.png', path_output='./', verbose=1):
        from sct_utils import printv
        nx, ny, nz, nt, px, py, pz, pt = self.dim
        if plane == 'sagittal':
            max_n_slices = nx
        elif plane == 'coronal':
            max_n_slices = ny
        elif plane == 'axial' or plane == 'transverse':
            max_n_slices = nz
        else:
            max_n_slices = None
            printv('ERROR: wrong plan input to save slice. Please choose "sagittal", "coronal" or "axial"', self.verbose, type='error')

        if n_slices > max_n_slices:
            index_list = range(max_n_slices)
        elif n_slices == 1:
            index_list = [int(round(max_n_slices/2))]
        else:
            gap = max_n_slices/n_slices
            index_list = [((i+1)*gap)-1 for i in range(n_slices)]
        index_list.sort()
        try:
            filename_image_png = self.save_plane(plane=plane, suffix='_'+plane+'_plane', index=index_list, format=format, path_output=path_output)
            info_str = 'QC output image: ' + filename_image_png
            if seg is not None:
                filename_gmseg_image_png = self.save_plane(plane=plane, suffix='_'+plane+'_plane_seg', index=index_list, seg=seg, thr=thr, cmap_col=cmap_col, format=format, path_output=path_output)
                info_str += ' & ' + filename_gmseg_image_png
            printv(info_str, verbose, 'info')
        except __HOLE__, e:
            printv('WARNING: your device does not seem to have display feature', self.verbose, type='warning')
            printv(str(e), self.verbose, type='warning')
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/msct_image.py/Image.save_quality_control