Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion nibabies/workflows/anatomical/surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from niworkflows.interfaces.freesurfer import (
PatchedRobustRegister as RobustRegister,
)
from niworkflows.interfaces.header import MatchHeader
from niworkflows.interfaces.morphology import BinaryDilation
from niworkflows.interfaces.patches import FreeSurferSource
from smriprep.interfaces.freesurfer import MakeMidthickness
Expand Down Expand Up @@ -126,6 +127,9 @@
mask_dil = pe.Node(BinaryDilation(radius=3), name='mask_dil')
mask_las = pe.Node(ReorientImage(target_orientation='LAS'), name='mask_las')

# N4 has low tolerance for mismatch between input / mask
match_header = pe.Node(MatchHeader(), name='match_header')

Check warning on line 131 in nibabies/workflows/anatomical/surfaces.py

View check run for this annotation

Codecov / codecov/patch

nibabies/workflows/anatomical/surfaces.py#L131

Added line #L131 was not covered by tests

# N4BiasCorrection occurs in MCRIBTissueSegMCRIBS (which is skipped)
# Run it (with mask to rescale intensities) prior injection
n4_mcribs = pe.Node(
Expand Down Expand Up @@ -177,7 +181,9 @@
('subjects_dir', 'subjects_dir'),
('subject_id', 'subject_id')]),
(t2w_las, n4_mcribs, [('out_file', 'input_image')]),
(mask_las, n4_mcribs, [('out_file', 'mask_image')]),
(mask_las, match_header, [('out_file', 'in_file')]),
(t2w_las, match_header, [('out_file', 'reference')]),
(match_header, n4_mcribs, [('out_file', 'mask_image')]),
(n4_mcribs, mcribs_recon, [('output_image', 't2w_file')]),
(seg_las, mcribs_recon, [('out_file', 'segmentation_file')]),
(inputnode, mcribs_postrecon, [
Expand Down