@@ -969,9 +969,9 @@ def init_infant_anat_fit_wf(
969
969
970
970
if concat_xfms :
971
971
LOGGER .info (f'ANAT Stage 5b: Concatenating normalization for { concat_xfms } ' )
972
- # 1. Select intermediate's transforms
972
+
973
973
select_infant_mni = pe .Node (
974
- KeySelect (fields = ['template' , ' anat2std_xfm' , 'std2anat_xfm' ], key = intermediate ),
974
+ KeySelect (fields = ['anat2std_xfm' , 'std2anat_xfm' ], key = intermediate ),
975
975
name = 'select_infant_mni' ,
976
976
run_without_submitting = True ,
977
977
)
@@ -983,15 +983,15 @@ def init_infant_anat_fit_wf(
983
983
)
984
984
985
985
workflow .connect ([
986
- (concat_template_buffer , select_infant_mni , [('out' , 'template ' )]),
986
+ (concat_template_buffer , select_infant_mni , [('out' , 'keys ' )]),
987
987
(concat_anat2std_buffer , select_infant_mni , [('out' , 'anat2std_xfm' )]),
988
988
(concat_std2anat_buffer , select_infant_mni , [('out' , 'std2anat_xfm' )]),
989
989
(select_infant_mni , concat_reg_wf , [
990
- ('template ' , 'inputnode.intermediate' ),
990
+ ('key ' , 'inputnode.intermediate' ),
991
991
('anat2std_xfm' , 'inputnode.anat2std_xfm' ),
992
992
('std2anat_xfm' , 'inputnode.std2anat_xfm' ),
993
993
]),
994
- (anat_buffer , concat_reg_wf , [('anat_preproc' , 'inputnode.anat_preproc' )]),
994
+ (anat_preproc_buffer , concat_reg_wf , [('anat_preproc' , 'inputnode.anat_preproc' )]),
995
995
(sourcefile_buffer , ds_concat_reg_wf , [
996
996
('anat_source_files' , 'inputnode.source_files' )
997
997
]),
@@ -1806,9 +1806,13 @@ def init_infant_single_anat_fit_wf(
1806
1806
concat_xfms = []
1807
1807
found_xfms = {}
1808
1808
intermediate = None # The intermediate space when concatenating xfms - includes cohort
1809
- intermediate_targets = {
1810
- 'MNI152NLin6Asym' ,
1811
- } # TODO: 'MNI152NLin2009cAsym'
1809
+ intermediate_targets = (
1810
+ {
1811
+ 'MNI152NLin6Asym' , # TODO: 'MNI152NLin2009cAsym'
1812
+ }
1813
+ if config .workflow .multi_step_reg
1814
+ else set ()
1815
+ )
1812
1816
1813
1817
for template in spaces .get_spaces (nonstandard = False , dim = (3 ,)):
1814
1818
# resolution / spec will not differentiate here
@@ -1882,13 +1886,12 @@ def init_infant_single_anat_fit_wf(
1882
1886
1883
1887
if concat_xfms :
1884
1888
LOGGER .info (f'ANAT Stage 5b: Concatenating normalization for { concat_xfms } ' )
1885
- # 1. Select intermediate's transforms
1889
+
1886
1890
select_infant_mni = pe .Node (
1887
- KeySelect (fields = ['template' , ' anat2std_xfm' , 'std2anat_xfm' ]),
1891
+ KeySelect (fields = ['anat2std_xfm' , 'std2anat_xfm' ], key = intermediate ),
1888
1892
name = 'select_infant_mni' ,
1889
1893
run_without_submitting = True ,
1890
1894
)
1891
- select_infant_mni .inputs .key = intermediate
1892
1895
1893
1896
concat_reg_wf = init_concat_registrations_wf (templates = concat_xfms )
1894
1897
ds_concat_reg_wf = init_ds_template_registration_wf (
@@ -1899,15 +1902,14 @@ def init_infant_single_anat_fit_wf(
1899
1902
1900
1903
workflow .connect ([
1901
1904
(concat_template_buffer , select_infant_mni , [('out' , 'keys' )]),
1902
- (concat_template_buffer , select_infant_mni , [('out' , 'template' )]),
1903
1905
(concat_anat2std_buffer , select_infant_mni , [('out' , 'anat2std_xfm' )]),
1904
1906
(concat_std2anat_buffer , select_infant_mni , [('out' , 'std2anat_xfm' )]),
1905
1907
(select_infant_mni , concat_reg_wf , [
1906
- ('template ' , 'inputnode.intermediate' ),
1908
+ ('key ' , 'inputnode.intermediate' ),
1907
1909
('anat2std_xfm' , 'inputnode.anat2std_xfm' ),
1908
1910
('std2anat_xfm' , 'inputnode.std2anat_xfm' ),
1909
1911
]),
1910
- (anat_buffer , concat_reg_wf , [('anat_preproc' , 'inputnode.anat_preproc' )]),
1912
+ (anat_preproc_buffer , concat_reg_wf , [('anat_preproc' , 'inputnode.anat_preproc' )]),
1911
1913
(sourcefile_buffer , ds_concat_reg_wf , [
1912
1914
('anat_source_files' , 'inputnode.source_files' )
1913
1915
]),
0 commit comments