#NEWLINE# def runNormalization( self ) : #NEWLINE# #INDENT# '\n        ' #NEWLINE# normalized = [ ] #NEWLINE# for i in range ( len ( self . inputFilenames ) ) : #NEWLINE# #INDENT# inputName = self . inputFilenames [ i ] #NEWLINE# outFileBase = ( fh . removeBaseAndExtension ( inputName ) + '_inorm.mnc' ) #NEWLINE# outFileDir = self . inputs [ i ] . resampledDir #NEWLINE# outFile = fh . createBaseName ( outFileDir , outFileBase ) #NEWLINE# normalized . append ( outFile ) #NEWLINE# cmd = [ 'inormalize' , '-clobber' ] #NEWLINE# cmd += [ '-const' , inputName . inormconst ] #NEWLINE# cmd += [ self . method ] #NEWLINE# if ( self . masks != None ) : #NEWLINE# #INDENT# cmd += [ '-mask' , self . masks [ i ] ] #NEWLINE# #UNINDENT# cmd += [ InputFile ( inputName ) ] #NEWLINE# cmd += [ OutputFile ( outFile ) ] #NEWLINE# inormalize = CmdStage ( cmd ) #NEWLINE# inormalize . colour = 'yellow' #NEWLINE# inormalize . setLogFile ( LogFile ( fh . logFromFile ( self . inputs [ i ] . logDir , outFile ) ) ) #NEWLINE# self . p . addStage ( inormalize ) #NEWLINE# #UNINDENT# self . INORM = normalized