#NEWLINE# def __init__( self , inputArray , outputDir , queue_type , likeFile = None , maxPairs = None , lsq12_protocol = None , subject_matter = None , resolution = None ) : #NEWLINE# #INDENT# self . p = Pipeline ( ) #NEWLINE# self . queue_type = queue_type #NEWLINE# 'Initial inputs should be an array of fileHandlers with lastBasevol in lsq12 space' #NEWLINE# self . inputs = inputArray #NEWLINE# 'Output directory should be _nlin ' #NEWLINE# self . lsq12Dir = outputDir #NEWLINE# 'likeFile for resampling' #NEWLINE# self . likeFile = likeFile #NEWLINE# 'Maximum number of pairs to calculate' #NEWLINE# self . maxPairs = maxPairs #NEWLINE# 'Final lsq12 average' #NEWLINE# self . lsq12Avg = None #NEWLINE# 'Final lsq12 average file handler (e.g. the file handler associated with lsq12Avg)' #NEWLINE# self . lsq12AvgFH = None #NEWLINE# ' Dictionary of lsq12 average transforms, which will include one per input.\n            Key is input file handler and value is string pointing to final average lsq12\n            transform for that particular subject. \n            These xfms may be used subsequently for statistics calculations. ' #NEWLINE# self . lsq12AvgXfms = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . fileRes = None #NEWLINE# 'Create the blurring resolution from the file resolution' #NEWLINE# if ( ( subject_matter == None ) and ( resolution == None ) ) : #NEWLINE# #INDENT# print ( '\nError: the FullLSQ12 module was called without specifying the resolution that it should be run at, and without specifying a subject matter. Please indicate one of the two. Exiting...\n' ) #NEWLINE# sys . exit ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( subject_matter and resolution ) : #NEWLINE# #INDENT# self . fileRes = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if resolution : #NEWLINE# #INDENT# self . fileRes = resolution #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# '"Set up parameter array' #NEWLINE# self . lsq12Params = mp . setLSQ12MinctraccParams ( self . fileRes , subject_matter = subject_matter , reg_protocol = lsq12_protocol ) #NEWLINE# self . blurs = self . lsq12Params . blurs #NEWLINE# self . stepSize = self . lsq12Params . stepSize #NEWLINE# self . useGradient = self . lsq12Params . useGradient #NEWLINE# self . simplex = self . lsq12Params . simplex #NEWLINE# self . w_translations = self . lsq12Params . w_translations #NEWLINE# self . generations = self . lsq12Params . generations #NEWLINE# for inputF in self . inputs : #NEWLINE# #INDENT# inputF . newGroup ( groupName = 'lsq12' )