Skip to content

Commit

Permalink
FIX: Convert boldref2fmap transforms to ITK text format
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Aug 23, 2023
1 parent 242e988 commit d9a0e3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fmriprep/workflows/bold/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from nipype.pipeline import engine as pe
from niworkflows.func.util import init_enhance_and_skullstrip_bold_wf
from niworkflows.interfaces.header import ValidateImage
from niworkflows.interfaces.nitransforms import ConcatenateXFMs
from niworkflows.utils.connections import listify
from sdcflows.workflows.apply.correction import init_unwarp_wf
from sdcflows.workflows.apply.registration import init_coeff2epi_wf
Expand Down Expand Up @@ -299,6 +300,8 @@ def init_bold_fit_wf(
run_without_submitting=True,
)

itk_mat2txt = pe.Node(ConcatenateXFMs(out_fmt="itk"), name="itk_text")

ds_fmapreg_wf = init_ds_registration_wf(
bids_root=layout.root,
output_dir=config.execution.output_dir,
Expand All @@ -322,7 +325,8 @@ def init_bold_fit_wf(
("fmap_coeff", "inputnode.fmap_coeff"),
("fmap_mask", "inputnode.fmap_mask"),
]),
(coeff2epi_wf, ds_fmapreg_wf, [('outputnode.target2fmap_xfm', 'inputnode.xform')]),
(coeff2epi_wf, itk_mat2txt, [('outputnode.target2fmap_xfm', 'in_xfms')]),
(itk_mat2txt, ds_fmapreg_wf, [('out_xfm', 'inputnode.xform')]),
# XXX Incomplete
(fmapref_buffer, ds_fmapreg_wf, [('out', 'inputnode.source_files')]),
(ds_fmapreg_wf, fmapreg_buffer, [('outputnode.xform', 'boldref2fmap_xfm')]),
Expand Down

0 comments on commit d9a0e3b

Please sign in to comment.