neurosynth/base/imageutils.py
def save_img(data, filename, masker, header=None):
    """ Save a vectorized image to file. """
    if not header:
        header = masker.get_header()
    header.set_data_dtype(data.dtype)  # Avoids loss of precision
    # Update min/max -- this should happen on save, but doesn't seem to
    header['cal_max'] = data.max()
    header['cal_min'] = data.min()
    img = nifti1.Nifti1Image(masker.unmask(data), None, header)
    img.to_filename(filename)
def save_img(data, filename, masker, header=None):
    if not header:
        header = masker.get_header()
    header.set_data_dtype(data.dtype)  # Avoids loss of precision
    # Update min/max -- this should happen on save, but doesn't seem to
    header['cal_max'] = data.max()
    header['cal_min'] = data.min()
    img = nifti1.Nifti1Image(masker.unmask(data), None, header)
    img.to_filename(filename)
def save_img ( data , filename , masker , header = None ) : if not header : header = masker . get_header ( ) header . set_data_dtype ( data . dtype ) # Avoids loss of precision # Update min/max -- this should happen on save, but doesn't seem to header [ 'cal_max' ] = data . max ( ) header [ 'cal_min' ] = data . min ( ) img = nifti1 . Nifti1Image ( masker . unmask ( data ) , None , header ) img . to_filename ( filename )
Save a vectorized image to file.
Save a vectorized image to file .