From 7a976df14cbd78af3dbca9b982d4f5f81700db1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Provins?= Date: Thu, 20 Jun 2024 07:43:25 +0200 Subject: [PATCH] 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. --- fmriprep/workflows/bold/registration.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fmriprep/workflows/bold/registration.py b/fmriprep/workflows/bold/registration.py index c6e918fa..0c71eeb7 100644 --- a/fmriprep/workflows/bold/registration.py +++ b/fmriprep/workflows/bold/registration.py @@ -560,7 +560,7 @@ def init_fsl_bbr_wf( name='inputnode', ) outputnode = pe.Node( - niu.IdentityInterface(['itk_bold_to_t1', 'itk_t1_to_bold', 'fallback']), + niu.IdentityInterface(['itk_bold_to_t1', 'itk_t1_to_bold', 'fallback', 'flip_info']), name='outputnode', ) @@ -605,6 +605,11 @@ def init_fsl_bbr_wf( name='fsl2itk_inv', mem_gb=DEFAULT_MEMORY_MIN_GB, ) + + def flip_detection_not_implemented_yet(): + return {'warning': 'Flip detection not implemented yet for alignment with FSL flirt', 'cost_original': '', 'cost_flipped': ''} + + check_flip = pe.Node(niu.Function(function=flip_detection_not_implemented_yet, output_names=['flip_info']), name='check_flip') # fmt:off workflow.connect([ (inputnode, mask_t1w_brain, [('t1w_preproc', 'in_file'), @@ -619,6 +624,7 @@ def init_fsl_bbr_wf( (invt_bbr, fsl2itk_inv, [('out_file', 'transform_file')]), (fsl2itk_fwd, outputnode, [('itk_transform', 'itk_bold_to_t1')]), (fsl2itk_inv, outputnode, [('itk_transform', 'itk_t1_to_bold')]), + (check_flip, outputnode, [('flip_info', 'flip_info')]), ]) # fmt:on