Skip to content

Commit 7a976df

Browse files
committed
enh: define a flip_info output for fsl_bbr_wf because otherwise test of the workflow initialisation fails complaining this connection does not exist. The output is the dictionary with the same keys as the flip_info for the bbr_wf except the value associated with the keys are empty.
1 parent a49a128 commit 7a976df

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fmriprep/workflows/bold/registration.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def init_fsl_bbr_wf(
560560
name='inputnode',
561561
)
562562
outputnode = pe.Node(
563-
niu.IdentityInterface(['itk_bold_to_t1', 'itk_t1_to_bold', 'fallback']),
563+
niu.IdentityInterface(['itk_bold_to_t1', 'itk_t1_to_bold', 'fallback', 'flip_info']),
564564
name='outputnode',
565565
)
566566

@@ -605,6 +605,11 @@ def init_fsl_bbr_wf(
605605
name='fsl2itk_inv',
606606
mem_gb=DEFAULT_MEMORY_MIN_GB,
607607
)
608+
609+
def flip_detection_not_implemented_yet():
610+
return {'warning': 'Flip detection not implemented yet for alignment with FSL flirt', 'cost_original': '', 'cost_flipped': ''}
611+
612+
check_flip = pe.Node(niu.Function(function=flip_detection_not_implemented_yet, output_names=['flip_info']), name='check_flip')
608613
# fmt:off
609614
workflow.connect([
610615
(inputnode, mask_t1w_brain, [('t1w_preproc', 'in_file'),
@@ -619,6 +624,7 @@ def init_fsl_bbr_wf(
619624
(invt_bbr, fsl2itk_inv, [('out_file', 'transform_file')]),
620625
(fsl2itk_fwd, outputnode, [('itk_transform', 'itk_bold_to_t1')]),
621626
(fsl2itk_inv, outputnode, [('itk_transform', 'itk_t1_to_bold')]),
627+
(check_flip, outputnode, [('flip_info', 'flip_info')]),
622628
])
623629
# fmt:on
624630

0 commit comments

Comments
 (0)