Skip to content

Commit 5eee41a

Browse files
committed
FEAT: Make multi-step registration optional
1 parent aaa7cc9 commit 5eee41a

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

nibabies/cli/parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,12 @@ def _str_none(val):
758758
action='store_true',
759759
help='Replace low intensity voxels in CSF mask with average',
760760
)
761+
g_baby.add_argument(
762+
'--multi-step-reg',
763+
action='store_true',
764+
help='For certain adult templates (MNI152NLin6Asym), perform two step '
765+
'registrations (native -> MNIInfant -> template) and concatenate into a single xfm',
766+
)
761767
return parser
762768

763769

nibabies/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ class workflow(_Config):
578578
"""Run FreeSurfer ``recon-all`` with the ``-logitudinal`` flag."""
579579
medial_surface_nan = None
580580
"""Fill medial surface with :abbr:`NaNs (not-a-number)` when sampling."""
581+
multi_step_reg = False
582+
"""Perform multiple registrations (native -> MNIInfant -> template) and concatenate into a
583+
single transform"""
581584
norm_csf = False
582585
"""Replace low intensity voxels in CSF mask with average."""
583586
project_goodvoxels = False

nibabies/workflows/anatomical/fit.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,9 +889,13 @@ def init_infant_anat_fit_wf(
889889
concat_xfms = []
890890
found_xfms = {}
891891
intermediate = None # The intermediate space when concatenating xfms - includes cohort
892-
intermediate_targets = {
893-
'MNI152NLin6Asym',
894-
} # TODO: 'MNI152NLin2009cAsym'
892+
intermediate_targets = (
893+
{
894+
'MNI152NLin6Asym', # TODO: 'MNI152NLin2009cAsym'
895+
}
896+
if config.workflow.multi_step_reg
897+
else set()
898+
)
895899

896900
for template in spaces.get_spaces(nonstandard=False, dim=(3,)):
897901
# resolution / spec will not differentiate here

0 commit comments

Comments
 (0)