Skip to content

Commit 8f87610

Browse files
committed
Move bold_anat_wf to full level.
1 parent 691017c commit 8f87610

File tree

1 file changed

+29
-25
lines changed

1 file changed

+29
-25
lines changed

fmriprep/workflows/bold/base.py

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -292,45 +292,20 @@ def init_bold_wf(
292292
fieldmap_id=fieldmap_id,
293293
omp_nthreads=omp_nthreads,
294294
)
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"
304295

305296
workflow.connect([
306297
(inputnode, bold_native_wf, [
307298
("fmap_ref", "inputnode.fmap_ref"),
308299
("fmap_coeff", "inputnode.fmap_coeff"),
309300
("fmap_id", "inputnode.fmap_id"),
310301
]),
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-
]),
318302
(bold_fit_wf, bold_native_wf, [
319303
("outputnode.coreg_boldref", "inputnode.boldref"),
320304
("outputnode.bold_mask", "inputnode.bold_mask"),
321305
("outputnode.motion_xfm", "inputnode.motion_xfm"),
322306
("outputnode.boldref2fmap_xfm", "inputnode.boldref2fmap_xfm"),
323307
("outputnode.dummy_scans", "inputnode.dummy_scans"),
324308
]),
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-
]),
334309
]) # fmt:skip
335310

336311
boldref_out = bool(nonstd_spaces.intersection(('func', 'run', 'bold', 'boldref', 'sbref')))
@@ -398,6 +373,35 @@ def init_bold_wf(
398373
if config.workflow.level == "resampling":
399374
return workflow
400375

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+
401405
# Full derivatives, including resampled BOLD series
402406
if nonstd_spaces.intersection(('anat', 'T1w')):
403407
ds_bold_t1_wf = init_ds_volumes_wf(

0 commit comments

Comments
 (0)