

def main(fname_in, freedom_degree, file_output):
    img = nib.load(fname_in)
    data = img.get_data()
    (sigma, mask) = piesno(data, N=mask, return_mask=True)
    sct.printv('\nWrite NIFTI volumes...')
    output_name = file_output
    nib.save(nib.Nifti1Image(mask, img.get_affine(), img.get_header()), output_name)
    sct.printv(('\n.. The noise standard deviation is sigma = ' + str(sigma)))

dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/sct_dmri_create_noisemask.py main/VarMisuse@43/57 `freedom_degree`->`mask`