@@ -92,6 +92,7 @@ def init_pepolar_estimate_wf(debug=False, generate_report=True, name="pepolar_es
92
92
from nipype .interfaces .afni import Automask
93
93
from nipype .interfaces .fsl .epi import TOPUP
94
94
from niworkflows .interfaces .nibabel import MergeSeries
95
+ from sdcflows .interfaces .fmap import get_trt
95
96
from ...interfaces .images import RescaleB0
96
97
wf = Workflow (name = name )
97
98
@@ -101,6 +102,10 @@ def init_pepolar_estimate_wf(debug=False, generate_report=True, name="pepolar_es
101
102
name = "outputnode" )
102
103
103
104
concat_blips = pe .Node (MergeSeries (), name = "concat_blips" )
105
+ readout_time = pe .MapNode (niu .Function (
106
+ input_names = ["metadata" , "in_file" ], function = get_trt ), name = "readout_time" ,
107
+ iterfield = ["metadata" , "in_file" ], run_without_submitting = True
108
+ )
104
109
105
110
topup = pe .Node (TOPUP (config = _pkg_fname (
106
111
"dmriprep" , f"data/flirtsch/b02b0{ '_quick' * debug } .cnf" )), name = "topup" )
@@ -112,8 +117,10 @@ def init_pepolar_estimate_wf(debug=False, generate_report=True, name="pepolar_es
112
117
name = "post_mask" )
113
118
wf .connect ([
114
119
(inputnode , concat_blips , [("in_data" , "in_files" )]),
115
- (inputnode , topup , [(("metadata" , _get_ro ), "readout_times" ),
116
- (("metadata" , _get_pedir ), "encoding_direction" )]),
120
+ (inputnode , readout_time , [("in_data" , "in_file" ),
121
+ ("metadata" , "metadata" )]),
122
+ (inputnode , topup , [(("metadata" , _get_pedir ), "encoding_direction" )]),
123
+ (readout_time , topup , [("out" , "readout_times" )]),
117
124
(concat_blips , topup , [("out_file" , "in_file" )]),
118
125
(topup , pre_mask , [("out_corrected" , "in_file" )]),
119
126
(pre_mask , rescale_corrected , [("out_file" , "mask_file" )]),
0 commit comments