7676 bvals = [['subject_id' , 'bvals' ]],
7777 seed_file = [['subject_id' , 'MASK_average_thal_right' ]],
7878 target_masks = [['subject_id' , ['MASK_average_M1_right' ,
79- 'MASK_average_S1_right' ,
80- 'MASK_average_occipital_right' ,
81- 'MASK_average_pfc_right' ,
82- 'MASK_average_pmc_right' ,
83- 'MASK_average_ppc_right' ,
84- 'MASK_average_temporal_right' ]]])
79+ 'MASK_average_S1_right' ,
80+ 'MASK_average_occipital_right' ,
81+ 'MASK_average_pfc_right' ,
82+ 'MASK_average_pmc_right' ,
83+ 'MASK_average_ppc_right' ,
84+ 'MASK_average_temporal_right' ]]])
8585
8686infosource = pe .Node (interface = util .IdentityInterface (fields = ['subject_id' ]),
8787 name = "infosource" )
165165"""
166166
167167computeTensor .connect ([
168- (fslroi , bet , [('roi_file' , 'in_file' )]),
169- (eddycorrect , dtifit , [('outputnode.eddy_corrected' , 'dwi' )]),
170- (infosource , dtifit , [['subject_id' , 'base_name' ]]),
171- (bet , dtifit , [('mask_file' , 'mask' )])
172- ])
168+ (fslroi , bet , [('roi_file' , 'in_file' )]),
169+ (eddycorrect , dtifit , [('outputnode.eddy_corrected' , 'dwi' )]),
170+ (infosource , dtifit , [['subject_id' , 'base_name' ]]),
171+ (bet , dtifit , [('mask_file' , 'mask' )])
172+ ])
173173
174174
175175"""
223223
224224tractography .add_nodes ([bedpostx , flirt ])
225225tractography .connect ([(bedpostx , probtrackx , [('outputnode.thsamples' , 'thsamples' ),
226- ('outputnode.phsamples' , 'phsamples' ),
227- ('outputnode.fsamples' , 'fsamples' )
228- ]),
226+ ('outputnode.phsamples' , 'phsamples' ),
227+ ('outputnode.fsamples' , 'fsamples' )
228+ ]),
229229 (probtrackx , findthebiggest , [('targets' , 'in_files' )]),
230230 (flirt , probtrackx , [('out_matrix_file' , 'xfm' )])
231231 ])
@@ -252,24 +252,24 @@ def getstripdir(subject_id):
252252dwiproc = pe .Workflow (name = "dwiproc" )
253253dwiproc .base_dir = os .path .abspath ('fsl_dti_tutorial' )
254254dwiproc .connect ([
255- (infosource , datasource , [('subject_id' , 'subject_id' )]),
256- (datasource , computeTensor , [('dwi' , 'fslroi.in_file' ),
257- ('bvals' , 'dtifit.bvals' ),
258- ('bvecs' , 'dtifit.bvecs' ),
259- ('dwi' , 'eddycorrect.inputnode.in_file' )]),
260- (datasource , tractography , [('bvals' , 'bedpostx.inputnode.bvals' ),
261- ('bvecs' , 'bedpostx.inputnode.bvecs' ),
262- ('seed_file' , 'probtrackx.seed' ),
263- ('target_masks' , 'probtrackx.target_masks' )
264- ]),
265- (computeTensor , tractography , [('eddycorrect.outputnode.eddy_corrected' , 'bedpostx.inputnode.dwi' ),
266- ('bet.mask_file' , 'bedpostx.inputnode.mask' ),
267- ('bet.mask_file' , 'probtrackx.mask' ),
268- ('fslroi.roi_file' , 'flirt.reference' )]),
269- (infosource , datasink , [('subject_id' , 'container' ),
270- (('subject_id' , getstripdir ), 'strip_dir' )]),
271- (tractography , datasink , [('findthebiggest.out_file' , 'fbiggest.@biggestsegmentation' )])
272- ])
255+ (infosource , datasource , [('subject_id' , 'subject_id' )]),
256+ (datasource , computeTensor , [('dwi' , 'fslroi.in_file' ),
257+ ('bvals' , 'dtifit.bvals' ),
258+ ('bvecs' , 'dtifit.bvecs' ),
259+ ('dwi' , 'eddycorrect.inputnode.in_file' )]),
260+ (datasource , tractography , [('bvals' , 'bedpostx.inputnode.bvals' ),
261+ ('bvecs' , 'bedpostx.inputnode.bvecs' ),
262+ ('seed_file' , 'probtrackx.seed' ),
263+ ('target_masks' , 'probtrackx.target_masks' )
264+ ]),
265+ (computeTensor , tractography , [('eddycorrect.outputnode.eddy_corrected' , 'bedpostx.inputnode.dwi' ),
266+ ('bet.mask_file' , 'bedpostx.inputnode.mask' ),
267+ ('bet.mask_file' , 'probtrackx.mask' ),
268+ ('fslroi.roi_file' , 'flirt.reference' )]),
269+ (infosource , datasink , [('subject_id' , 'container' ),
270+ (('subject_id' , getstripdir ), 'strip_dir' )]),
271+ (tractography , datasink , [('findthebiggest.out_file' , 'fbiggest.@biggestsegmentation' )])
272+ ])
273273
274274if __name__ == '__main__' :
275275 dwiproc .run ()
0 commit comments