Skip to content

Commit 3701d43

Browse files
committed
RF: Alter io fields within fit workflow
1 parent ce09d87 commit 3701d43

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

smriprep/workflows/anatomical.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def init_anat_preproc_wf(
355355
('outputnode.t1w_preproc', 'inputnode.reference'),
356356
('outputnode.subjects_dir', 'inputnode.subjects_dir'),
357357
('outputnode.subject_id', 'inputnode.subject_id'),
358-
('outputnode.fsnative2t1w_xfm', 'inputnode.fsnative2t1w_xfm'),
358+
('outputnode.fsnative2t1w_xfm', 'inputnode.fsnative2anat_xfm'),
359359
]),
360360
(anat_fit_wf, ds_surfaces_wf, [
361361
('outputnode.t1w_valid_list', 'inputnode.source_files'),
@@ -765,7 +765,7 @@ def init_anat_fit_wf(
765765
longitudinal=longitudinal,
766766
omp_nthreads=omp_nthreads,
767767
num_files=num_t1w,
768-
contrast='T1w',
768+
image_type='T1w',
769769
name='anat_template_wf',
770770
)
771771
ds_template_wf = init_ds_template_wf(output_dir=output_dir, num_t1w=num_t1w)
@@ -1088,10 +1088,10 @@ def init_anat_fit_wf(
10881088
('source_files', 'inputnode.source_files'),
10891089
]),
10901090
(surface_recon_wf, ds_fs_registration_wf, [
1091-
('outputnode.fsnative2t1w_xfm', 'inputnode.fsnative2t1w_xfm'),
1091+
('outputnode.fsnative2t1w_xfm', 'inputnode.fsnative2anat_xfm'),
10921092
]),
10931093
(ds_fs_registration_wf, outputnode, [
1094-
('outputnode.fsnative2t1w_xfm', 'fsnative2t1w_xfm'),
1094+
('outputnode.fsnative2anat_xfm', 'fsnative2t1w_xfm'),
10951095
]),
10961096
])
10971097
# fmt:on
@@ -1114,7 +1114,7 @@ def init_anat_fit_wf(
11141114
(surface_recon_wf, refinement_wf, [
11151115
('outputnode.subjects_dir', 'inputnode.subjects_dir'),
11161116
('outputnode.subject_id', 'inputnode.subject_id'),
1117-
('outputnode.fsnative2t1w_xfm', 'inputnode.fsnative2t1w_xfm'),
1117+
('outputnode.fsnative2t1w_xfm', 'inputnode.fsnative2anat_xfm'),
11181118
]),
11191119
(t1w_buffer, refinement_wf, [
11201120
('t1w_preproc', 'inputnode.reference_image'),
@@ -1135,7 +1135,7 @@ def init_anat_fit_wf(
11351135
longitudinal=longitudinal,
11361136
omp_nthreads=omp_nthreads,
11371137
num_files=len(t2w),
1138-
contrast='T2w',
1138+
image_type='T2w',
11391139
name='t2w_template_wf',
11401140
)
11411141
bbreg = pe.Node(
@@ -1224,7 +1224,7 @@ def init_anat_fit_wf(
12241224
(surface_recon_wf, gifti_surfaces_wf, [
12251225
('outputnode.subject_id', 'inputnode.subject_id'),
12261226
('outputnode.subjects_dir', 'inputnode.subjects_dir'),
1227-
('outputnode.fsnative2t1w_xfm', 'inputnode.fsnative2t1w_xfm'),
1227+
('outputnode.fsnative2t1w_xfm', 'inputnode.fsnative2anat_xfm'),
12281228
]),
12291229
(gifti_surfaces_wf, surfaces_buffer, [
12301230
(f'outputnode.{surf}', surf) for surf in surfs
@@ -1375,7 +1375,7 @@ def init_anat_template_wf(
13751375
longitudinal: bool,
13761376
omp_nthreads: int,
13771377
num_files: int,
1378-
contrast: str,
1378+
image_type: ty.Literal['T1w', 'T2w'] = 'T1w',
13791379
name: str = 'anat_template_wf',
13801380
):
13811381
"""
@@ -1400,8 +1400,8 @@ def init_anat_template_wf(
14001400
Maximum number of threads an individual process may use
14011401
num_files : :obj:`int`
14021402
Number of images
1403-
contrast : :obj:`str`
1404-
Name of contrast, for reporting purposes, e.g., T1w, T2w, PDw
1403+
image_type : :obj:`str`
1404+
MR image type (T1w, T2w, etc.)
14051405
name : :obj:`str`, optional
14061406
Workflow name (default: anat_template_wf)
14071407
@@ -1427,8 +1427,8 @@ def init_anat_template_wf(
14271427
if num_files > 1:
14281428
fs_ver = fs.Info().looseversion() or '(version unknown)'
14291429
workflow.__desc__ = f"""\
1430-
An anatomical {contrast}-reference map was computed after registration of
1431-
{num_files} {contrast} images (after INU-correction) using
1430+
An anatomical {image_type}-reference map was computed after registration of
1431+
{num_files} {image} images (after INU-correction) using
14321432
`mri_robust_template` [FreeSurfer {fs_ver}, @fs_template].
14331433
"""
14341434

0 commit comments

Comments
 (0)