#NEWLINE# def convert( fname_in , fname_out , squeeze_data = True , type = None , verbose = 1 ) : #NEWLINE# #INDENT# '\n    Convert data\n    :return True/False\n    ' #NEWLINE# from msct_image import Image #NEWLINE# from sct_utils import printv #NEWLINE# printv ( ( ( ( 'sct_convert -i ' + fname_in ) + ' -o ' ) + fname_out ) , verbose , 'code' ) #NEWLINE# im = Image ( fname_in ) #NEWLINE# im . setFileName ( fname_out ) #NEWLINE# if ( type is not None ) : #NEWLINE# #INDENT# im . changeType ( type = type ) #NEWLINE# #UNINDENT# im . save ( squeeze_data = squeeze_data ) #NEWLINE# return im