Skip to content

Commit

Permalink
FIX: Copy header to ensure mask is really aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Dec 8, 2023
1 parent f15c091 commit dba5d3a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions niworkflows/func/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
FixHeaderApplyTransforms as ApplyTransforms,
FixN4BiasFieldCorrection as N4BiasFieldCorrection,
)
from ..interfaces.header import CopyXForm, ValidateImage, MatchHeader
from ..interfaces.header import CopyHeader, CopyXForm, ValidateImage
from ..interfaces.reportlets.masks import SimpleShowMaskRPT
from ..utils.connections import listify
from ..utils.misc import pass_dummy_scans as _pass_dummy_scans
Expand Down Expand Up @@ -473,11 +473,11 @@ def init_enhance_and_skullstrip_bold_wf(
name="map_brainmask",
)
# Ensure mask's header matches reference's
check_hdr = pe.Node(MatchHeader(), name="check_hdr", run_without_submitting=True)
fix_header = pe.Node(CopyHeader(), name="fix_header", run_without_submitting=True)

Check warning on line 476 in niworkflows/func/util.py

View check run for this annotation

Codecov / codecov/patch

niworkflows/func/util.py#L476

Added line #L476 was not covered by tests

# fmt: off
workflow.connect([
(inputnode, check_hdr, [("in_file", "reference")]),
(inputnode, fix_header, [("in_file", "hdr_file")]),
(inputnode, init_aff, [("in_file", "moving_image")]),
(inputnode, map_brainmask, [("in_file", "reference_image")]),
(inputnode, norm, [("in_file", "moving_image")]),
Expand All @@ -486,8 +486,8 @@ def init_enhance_and_skullstrip_bold_wf(
("reverse_invert_flags", "invert_transform_flags"),
("reverse_transforms", "transforms"),
]),
(map_brainmask, check_hdr, [("output_image", "in_file")]),
(check_hdr, n4_correct, [("out_file", "weight_image")]),
(map_brainmask, fix_header, [("output_image", "in_file")]),
(fix_header, n4_correct, [("out_file", "weight_image")]),
])
# fmt: on
else:
Expand Down

0 comments on commit dba5d3a

Please sign in to comment.