code: def slice_save(self, astr_outputFile):
          '''
          Saves a single slice.
  
          ARGS
  
          o astr_output
          The output filename to save the slice to.
          '''
          self._log('Outputfile = %s\n' % astr_outputFile)
          fformat = astr_outputFile.split('.')[-1]
          if fformat == 'dcm':
              if self._dcm:
                  self._dcm.pixel_array.flat = self._Mnp_2Dslice.flat
                  self._dcm.PixelData = self._dcm.pixel_array.tostring()
                  self._dcm.save_as(astr_outputFile)
              else:
                  raise ValueError('dcm output format only available for DICOM files')
          else:
              pylab.imsave(astr_outputFile, self._Mnp_2Dslice, format=fformat, cmap = cm.Greys_rf slice_save(self, astr_outputFile):
          '''
          Saves a single slice.
  
          ARGS
  
          o astr_output
          The output filename to save the slice to.
          '''
          self._log('Outputfile = %s\n' % astr_outputFile)
          fformat = astr_outputFile.split('.')[-1]
          if fformat == 'dcm':
              if self._dcm:
                  self._dcm.pixel_array.flat = self._Mnp_2Dslice.flat
                  self._dcm.PixelData = self._dcm.pixel_array.tostring()
                  self._dcm.save_as(astr_outputFile)
              else:
                  raise ValueError('dcm output format only available for DICOM files')
          else:
              pylab.imsave(astr_outputFile, self._Mnp_2Dslice, format=fformat, cmap = cm.Greys_r)
docs: Saves a single slice.
  
          ARGS
  
          o astr_output
          The output filename to save the slice to.