@@ -387,7 +387,8 @@ def create_reg_workflow(name='registration'):
387
387
'transformed_mean' ,
388
388
'segmentation_files' ,
389
389
'anat2target' ,
390
- 'aparc'
390
+ 'aparc' ,
391
+ 'min_cost_file'
391
392
]),
392
393
name = 'outputspec' )
393
394
@@ -554,6 +555,8 @@ def create_reg_workflow(name='registration'):
554
555
register .connect (reg , 'composite_transform' ,
555
556
outputnode , 'anat2target_transform' )
556
557
register .connect (merge , 'out' , outputnode , 'transforms' )
558
+ register .connect (bbregister , 'min_cost_file' ,
559
+ outputnode , 'min_cost_file' )
557
560
558
561
return register
559
562
@@ -615,6 +618,13 @@ def create_workflow(files,
615
618
registration .inputs .inputspec .subjects_dir = subjects_dir
616
619
registration .inputs .inputspec .target_image = target_file
617
620
621
+ """Quantify TSNR in each freesurfer ROI
622
+ """
623
+ get_roi_tsnr = pe .MapNode (fs .SegStats (default_color_table = True ),
624
+ iterfield = ['in_file' ], name = 'get_aparc_tsnr' )
625
+ get_roi_tsnr .inputs .avgwf_txt_file = True
626
+ wf .connect (tsnr , 'tsnr_file' , get_roi_tsnr , 'in_file' )
627
+ wf .connect (registration , 'outputspec.aparc' , get_roi_tsnr , 'segmentation_file' )
618
628
619
629
"""Use :class:`nipype.algorithms.rapidart` to determine which of the
620
630
images in the functional series are outliers based on deviations in
@@ -910,6 +920,10 @@ def get_names(files, suffix):
910
920
wf .connect (filter1 , 'out_pf' , datasink , 'resting.qa.compmaps.@mc_pF' )
911
921
wf .connect (filter2 , 'out_f' , datasink , 'resting.qa.compmaps' )
912
922
wf .connect (filter2 , 'out_pf' , datasink , 'resting.qa.compmaps.@p' )
923
+ wf .connect (registration , 'outputspec.min_cost_file' , datasink , 'resting.qa.mincost' )
924
+ wf .connect ([(get_roi_tsnr , datasink , [('avgwf_txt_file' , 'resting.qa.tsnr' ),
925
+ ('summary_file' , 'resting.qa.tsnr.@summary' )])])
926
+
913
927
wf .connect (bandpass , 'out_files' , datasink , 'resting.timeseries.@bandpassed' )
914
928
wf .connect (smooth , 'out_file' , datasink , 'resting.timeseries.@smoothed' )
915
929
wf .connect (createfilter1 , 'out_files' ,
0 commit comments