Skip to content

Commit fa3c305

Browse files
authored
Merge branch 'master' into nordic
2 parents 88fa7ff + ed8804e commit fa3c305

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

fmriprep/workflows/bold/fit.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import nibabel as nb
2828
from nipype.interfaces import utility as niu
2929
from nipype.pipeline import engine as pe
30-
from niworkflows.func.util import init_enhance_and_skullstrip_bold_wf
30+
from niworkflows.func.util import init_enhance_and_skullstrip_bold_wf, init_skullstrip_bold_wf
3131
from niworkflows.interfaces.header import ValidateImage
3232
from niworkflows.interfaces.nitransforms import ConcatenateXFMs
3333
from niworkflows.interfaces.utility import KeySelect
@@ -554,7 +554,8 @@ def init_bold_fit_wf(
554554
)
555555
unwarp_wf.inputs.inputnode.metadata = layout.get_metadata(bold_file)
556556

557-
# fmt:off
557+
skullstrip_bold_wf = init_skullstrip_bold_wf()
558+
558559
workflow.connect([
559560
(inputnode, fmap_select, [
560561
('fmap_ref', 'fmap_ref'),
@@ -579,28 +580,28 @@ def init_bold_fit_wf(
579580
(unwarp_wf, ds_coreg_boldref_wf, [
580581
('outputnode.corrected', 'inputnode.boldref'),
581582
]),
582-
(unwarp_wf, ds_boldmask_wf, [
583-
('outputnode.corrected_mask', 'inputnode.boldmask'),
583+
(unwarp_wf, skullstrip_bold_wf, [
584+
('outputnode.corrected', 'inputnode.in_file'),
585+
]),
586+
(skullstrip_bold_wf, ds_boldmask_wf, [
587+
('outputnode.mask_file', 'inputnode.boldmask'),
584588
]),
585589
(fmap_select, func_fit_reports_wf, [('fmap_ref', 'inputnode.fmap_ref')]),
586590
(fmap_select, summary, [('sdc_method', 'distortion_correction')]),
587591
(fmapreg_buffer, func_fit_reports_wf, [
588592
('boldref2fmap_xfm', 'inputnode.boldref2fmap_xfm'),
589593
]),
590594
(unwarp_wf, func_fit_reports_wf, [('outputnode.fieldmap', 'inputnode.fieldmap')]),
591-
])
592-
# fmt:on
595+
]) # fmt:skip
593596
else:
594-
# fmt:off
595597
workflow.connect([
596598
(enhance_boldref_wf, ds_coreg_boldref_wf, [
597599
('outputnode.bias_corrected_file', 'inputnode.boldref'),
598600
]),
599601
(enhance_boldref_wf, ds_boldmask_wf, [
600602
('outputnode.mask_file', 'inputnode.boldmask'),
601603
]),
602-
])
603-
# fmt:on
604+
]) # fmt:skip
604605
else:
605606
config.loggers.workflow.info('Found coregistration reference - skipping Stage 3')
606607
regref_buffer.inputs.boldref = precomputed['coreg_boldref']

0 commit comments

Comments
 (0)