Skip to content

Commit 46c4993

Browse files
committed
add t1 skullstrip workflow
1 parent 5d472a4 commit 46c4993

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

dmriprep/workflows/anatomical.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# -*- coding: utf-8 -*-
2+
3+
"""
4+
Orchestrating the T1w preprocessing workflows
5+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
7+
.. autofunction:: init_anat_preproc_wf
8+
9+
"""
10+
11+
from nipype.pipeline import engine as pe
12+
from nipype.interfaces import utility as niu
13+
14+
from niworkflows.anat.ants import init_brain_extraction_wf
15+
16+
17+
def init_anat_preproc_wf()
18+
"""
19+
"""
20+
21+
wf = pe.Workflow(name='init_anat_preproc_wf')
22+
23+
inputnode = pe.Node(niu.IdentityInterface(fields=['T1w_file']), name='inputnode')
24+
25+
outputnode = pe.Node(niu.IdentityInterface(fields=['out_file']), name='outputnode')
26+
27+
t1_skullstrip = init_brain_extraction_wf()
28+
29+
to_list = lambda x: [x]
30+
31+
wf.connect([
32+
(inputnode, t1_skullstrip, [(('t1_file', to_list), 'inputnode.in_files')]),
33+
(t1_skullstrip, outputnode, [('outputnode.out_file', 'out_file')])
34+
])
35+
36+
return wf

docs/dmriprep.workflows.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ Subpackages
1212
Submodules
1313
----------
1414

15+
dmriprep.workflows.anatomical module
16+
------------------------------------
17+
18+
.. automodule:: dmriprep.workflows.anatomical
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
1523
dmriprep.workflows.base module
1624
------------------------------
1725

0 commit comments

Comments
 (0)