@@ -292,45 +292,20 @@ def init_bold_wf(
292
292
fieldmap_id = fieldmap_id ,
293
293
omp_nthreads = omp_nthreads ,
294
294
)
295
- # NOTE: Why put this in 'resampling' and not 'full'?
296
- bold_anat_wf = init_bold_volumetric_resample_wf (
297
- metadata = all_metadata [0 ],
298
- fieldmap_id = fieldmap_id if not multiecho else None ,
299
- omp_nthreads = omp_nthreads ,
300
- mem_gb = mem_gb ,
301
- name = 'bold_anat_wf' ,
302
- )
303
- bold_anat_wf .inputs .inputnode .resolution = "native"
304
295
305
296
workflow .connect ([
306
297
(inputnode , bold_native_wf , [
307
298
("fmap_ref" , "inputnode.fmap_ref" ),
308
299
("fmap_coeff" , "inputnode.fmap_coeff" ),
309
300
("fmap_id" , "inputnode.fmap_id" ),
310
301
]),
311
- (inputnode , bold_anat_wf , [
312
- ("t1w_preproc" , "inputnode.target_ref_file" ),
313
- ("t1w_mask" , "inputnode.target_mask" ),
314
- ("fmap_ref" , "inputnode.fmap_ref" ),
315
- ("fmap_coeff" , "inputnode.fmap_coeff" ),
316
- ("fmap_id" , "inputnode.fmap_id" ),
317
- ]),
318
302
(bold_fit_wf , bold_native_wf , [
319
303
("outputnode.coreg_boldref" , "inputnode.boldref" ),
320
304
("outputnode.bold_mask" , "inputnode.bold_mask" ),
321
305
("outputnode.motion_xfm" , "inputnode.motion_xfm" ),
322
306
("outputnode.boldref2fmap_xfm" , "inputnode.boldref2fmap_xfm" ),
323
307
("outputnode.dummy_scans" , "inputnode.dummy_scans" ),
324
308
]),
325
- (bold_fit_wf , bold_anat_wf , [
326
- ("outputnode.coreg_boldref" , "inputnode.bold_ref_file" ),
327
- ("outputnode.boldref2fmap_xfm" , "inputnode.boldref2fmap_xfm" ),
328
- ("outputnode.boldref2anat_xfm" , "inputnode.boldref2anat_xfm" ),
329
- ]),
330
- (bold_native_wf , bold_anat_wf , [
331
- ("outputnode.bold_minimal" , "inputnode.bold_file" ),
332
- ("outputnode.motion_xfm" , "inputnode.motion_xfm" ),
333
- ]),
334
309
]) # fmt:skip
335
310
336
311
boldref_out = bool (nonstd_spaces .intersection (('func' , 'run' , 'bold' , 'boldref' , 'sbref' )))
@@ -398,6 +373,35 @@ def init_bold_wf(
398
373
if config .workflow .level == "resampling" :
399
374
return workflow
400
375
376
+ # Resample to anatomical space
377
+ bold_anat_wf = init_bold_volumetric_resample_wf (
378
+ metadata = all_metadata [0 ],
379
+ fieldmap_id = fieldmap_id if not multiecho else None ,
380
+ omp_nthreads = omp_nthreads ,
381
+ mem_gb = mem_gb ,
382
+ name = 'bold_anat_wf' ,
383
+ )
384
+ bold_anat_wf .inputs .inputnode .resolution = "native"
385
+
386
+ workflow .connect ([
387
+ (inputnode , bold_anat_wf , [
388
+ ("t1w_preproc" , "inputnode.target_ref_file" ),
389
+ ("t1w_mask" , "inputnode.target_mask" ),
390
+ ("fmap_ref" , "inputnode.fmap_ref" ),
391
+ ("fmap_coeff" , "inputnode.fmap_coeff" ),
392
+ ("fmap_id" , "inputnode.fmap_id" ),
393
+ ]),
394
+ (bold_fit_wf , bold_anat_wf , [
395
+ ("outputnode.coreg_boldref" , "inputnode.bold_ref_file" ),
396
+ ("outputnode.boldref2fmap_xfm" , "inputnode.boldref2fmap_xfm" ),
397
+ ("outputnode.boldref2anat_xfm" , "inputnode.boldref2anat_xfm" ),
398
+ ]),
399
+ (bold_native_wf , bold_anat_wf , [
400
+ ("outputnode.bold_minimal" , "inputnode.bold_file" ),
401
+ ("outputnode.motion_xfm" , "inputnode.motion_xfm" ),
402
+ ]),
403
+ ]) # fmt:skip
404
+
401
405
# Full derivatives, including resampled BOLD series
402
406
if nonstd_spaces .intersection (('anat' , 'T1w' )):
403
407
ds_bold_t1_wf = init_ds_volumes_wf (
0 commit comments