53
53
from ..interfaces .workbench import CreateSignedDistanceVolume
54
54
55
55
56
- def init_surface_recon_wf (* , omp_nthreads , hires , fs_reuse_base , name = "surface_recon_wf" ):
56
+ def init_surface_recon_wf (
57
+ * ,
58
+ omp_nthreads ,
59
+ hires ,
60
+ fs_reuse_base ,
61
+ name = "surface_recon_wf"
62
+ ):
57
63
r"""
58
64
Reconstruct anatomical surfaces using FreeSurfer's ``recon-all``.
59
65
@@ -125,7 +131,8 @@ def init_surface_recon_wf(*, omp_nthreads, hires, fs_reuse_base, name="surface_r
125
131
hires : bool
126
132
Enable sub-millimeter preprocessing in FreeSurfer
127
133
fs_reuse_base : bool
128
- Adjust pipeline to reuse base template of existing longitudinal freesurfer
134
+ Adjust pipeline to reuse base template
135
+ of an existing longitudinal freesurfer output
129
136
130
137
Inputs
131
138
------
@@ -264,42 +271,48 @@ def init_surface_recon_wf(*, omp_nthreads, hires, fs_reuse_base, name="surface_r
264
271
# Passing subjects_dir / subject_id enforces serial order
265
272
(inputnode , autorecon1 , [('subjects_dir' , 'subjects_dir' ),
266
273
('subject_id' , 'subject_id' )]),
267
- (autorecon1 , skull_strip_extern , [('subjects_dir' , 'subjects_dir' ),
268
- ('subject_id' , 'subject_id' )]),
269
- (skull_strip_extern , autorecon_resume_wf , [('subjects_dir' , 'inputnode.subjects_dir' ),
270
- ('subject_id' , 'inputnode.subject_id' )]),
274
+ (autorecon1 , skull_strip_extern , [
275
+ ('subjects_dir' , 'subjects_dir' ),
276
+ ('subject_id' , 'subject_id' )]),
277
+ (skull_strip_extern , autorecon_resume_wf , [
278
+ ('subjects_dir' , 'inputnode.subjects_dir' ),
279
+ ('subject_id' , 'inputnode.subject_id' )]),
271
280
(autorecon_resume_wf , gifti_surface_wf , [
272
281
('outputnode.subjects_dir' , 'inputnode.subjects_dir' ),
273
282
('outputnode.subject_id' , 'inputnode.subject_id' )]),
274
283
# Reconstruction phases
275
284
(inputnode , autorecon1 , [('t1w' , 'T1_files' )]),
276
285
(inputnode , fov_check , [('t1w' , 'in_files' )]),
277
286
(fov_check , autorecon1 , [('out' , 'flags' )]),
278
- (recon_config , autorecon1 , [('t2w' , 'T2_file' ),
279
- ('flair' , 'FLAIR_file' ),
280
- ('hires' , 'hires' ),
281
- # First run only (recon-all saves expert options)
282
- ('mris_inflate' , 'mris_inflate' )]),
283
- (inputnode , skull_strip_extern , [('skullstripped_t1' , 'in_brain' )]),
284
- (recon_config , autorecon_resume_wf , [('use_t2w' , 'inputnode.use_T2' ),
285
- ('use_flair' , 'inputnode.use_FLAIR' )]),
287
+ (recon_config , autorecon1 , [
288
+ ('t2w' , 'T2_file' ),
289
+ ('flair' , 'FLAIR_file' ),
290
+ ('hires' , 'hires' ),
291
+ # First run only (recon-all saves expert options)
292
+ ('mris_inflate' , 'mris_inflate' )]),
293
+ (inputnode , skull_strip_extern , [
294
+ ('skullstripped_t1' , 'in_brain' )]),
295
+ (recon_config , autorecon_resume_wf , [
296
+ ('use_t2w' , 'inputnode.use_T2' ),
297
+ ('use_flair' , 'inputnode.use_FLAIR' )]),
286
298
(autorecon1 , fsnative2t1w_xfm , [('T1' , 'source_file' )]),
287
-
288
-
289
299
(autorecon_resume_wf , aseg_to_native_wf , [
290
300
('outputnode.subjects_dir' , 'inputnode.subjects_dir' ),
291
301
('outputnode.subject_id' , 'inputnode.subject_id' )]),
292
-
293
302
(autorecon_resume_wf , aparc_to_native_wf , [
294
303
('outputnode.subjects_dir' , 'inputnode.subjects_dir' ),
295
304
('outputnode.subject_id' , 'inputnode.subject_id' )]),
296
305
# Output
297
- (autorecon_resume_wf , outputnode , [('outputnode.subjects_dir' , 'subjects_dir' ),
298
- ('outputnode.subject_id' , 'subject_id' )]),
306
+ (autorecon_resume_wf , outputnode , [
307
+ ('outputnode.subjects_dir' , 'subjects_dir' ),
308
+ ('outputnode.subject_id' , 'subject_id' )]),
299
309
])
300
310
# fmt:on
301
311
else :
302
- fs_base_inputs = pe .Node (nio .FreeSurferSource (), name = 'fs_base_inputs' )
312
+ fs_base_inputs = pe .Node (
313
+ nio .FreeSurferSource (),
314
+ name = 'fs_base_inputs'
315
+ )
303
316
304
317
# fmt:off
305
318
workflow .connect ([
@@ -317,7 +330,6 @@ def init_surface_recon_wf(*, omp_nthreads, hires, fs_reuse_base, name="surface_r
317
330
(inputnode , aparc_to_native_wf , [
318
331
('subjects_dir' , 'inputnode.subjects_dir' ),
319
332
('subject_id' , 'inputnode.subject_id' )]),
320
-
321
333
# Output
322
334
(inputnode , outputnode , [('subjects_dir' , 'subjects_dir' ),
323
335
('subject_id' , 'subject_id' )]),
0 commit comments