@@ -299,19 +299,19 @@ def hmc_pipeline(name='motion_correct'):
299
299
outputnode.out_xfms - list of transformation matrices
300
300
301
301
"""
302
- params = dict (dof = 6 , interp = 'spline' , padding_size = 10 , save_log = True ,
302
+ params = dict (dof = 6 , padding_size = 10 , save_log = True ,
303
303
searchr_x = [- 3 , 3 ], searchr_y = [- 3 , 3 ], searchr_z = [- 3 , 3 ],
304
- fine_search = 1 , coarse_search = 2 )
305
- # cost='normmi ', cost_func='normmi ', bins=64,
304
+ fine_search = 1 , coarse_search = 2 ,
305
+ cost = 'mutualinfo ' , cost_func = 'mutualinfo ' , bins = 64 )
306
306
307
307
inputnode = pe .Node (niu .IdentityInterface (fields = ['in_file' , 'ref_num' ,
308
308
'in_bvec' , 'in_bval' , 'in_mask' ]), name = 'inputnode' )
309
309
refid = pe .Node (niu .IdentityInterface (fields = ['ref_num' ]),
310
310
name = 'RefVolume' )
311
311
pick_ref = pe .Node (fsl .ExtractROI (t_size = 1 ), name = 'GetRef' )
312
- pick_mov = pe .Node (niu .Function (input_names = ['in_file' , 'volid' ],
313
- output_names = ['out_file' ], function = remove_comp ) ,
314
- name = 'GetMovingDWs' )
312
+ pick_mov = pe .Node (niu .Function (input_names = ['in_file' , 'in_bval' , ' volid' ],
313
+ output_names = ['out_file' , 'out_bval' ] ,
314
+ function = remove_comp ), name = 'GetMovingDWs' )
315
315
flirt = dwi_flirt (flirt_param = params )
316
316
insmat = pe .Node (niu .Function (input_names = ['inlist' , 'volid' ],
317
317
output_names = ['out' ], function = insert_mat ),
@@ -327,12 +327,14 @@ def hmc_pipeline(name='motion_correct'):
327
327
wf .connect ([
328
328
(inputnode , refid , [(('ref_num' , _checkrnum ), 'ref_num' )])
329
329
,(inputnode , pick_ref , [('in_file' , 'in_file' )])
330
+ ,(inputnode , pick_mov , [('in_file' , 'in_file' ),
331
+ ('in_bval' , 'in_bval' )])
332
+ ,(inputnode , flirt , [('in_mask' , 'inputnode.ref_mask' )])
330
333
,(refid , pick_ref , [('ref_num' , 't_min' )])
331
- ,(inputnode , pick_mov , [('in_file' , 'in_file' )])
332
334
,(refid , pick_mov , [('ref_num' , 'volid' )])
333
- ,(inputnode , flirt , [('in_file ' , 'inputnode.in_file' ),
334
- ('in_mask ' , 'inputnode.ref_mask' ),
335
- ( 'in_bval' , 'inputnode.in_bval' )])
335
+ ,(pick_mov , flirt , [('out_file ' , 'inputnode.in_file' ),
336
+ ('out_bval ' , 'inputnode.in_bval' )])
337
+
336
338
,(pick_ref , flirt , [('roi_file' , 'inputnode.reference' )])
337
339
,(flirt , insmat , [('outputnode.out_xfms' , 'inlist' )])
338
340
,(refid , insmat , [('ref_num' , 'volid' )])
0 commit comments