Skip to content

Commit 4538eb5

Browse files
author
David Ellis
committed
ENH: Adds outputs from the BAMaps workflow to the outputspec.
1 parent c2bdc66 commit 4538eb5

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

nipype/workflows/smri/freesurfer/ba_maps.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,22 @@ def create_ba_maps_wf(name="Brodmann_Area_Maps", th3=True):
3636

3737
ba_outputs = ['lh_table',
3838
'lh_color',
39+
'lh_BAMaps_labels',
40+
'lh_BAMaps_annotation',
3941
'lh_thresh_table',
4042
'lh_thresh_color',
43+
'lh_thresh_BAMaps_labels',
44+
'lh_thresh_BAMaps_annotation',
4145
'rh_table',
4246
'rh_color',
47+
'rh_BAMaps_labels',
48+
'rh_BAMaps_annotation',
4349
'rh_thresh_table',
44-
'rh_thresh_color']
50+
'rh_thresh_color',
51+
'rh_thresh_BAMaps_labels',
52+
'rh_thresh_BAMaps_annotation']
4553

46-
outputSpec = pe.Node(IdentityInterface(fields=ba_outputs),
54+
outputspec = pe.Node(IdentityInterface(fields=ba_outputs),
4755
name="outputspec")
4856

4957
labels = ["BA1", "BA2", "BA3a", "BA3b", "BA4a", "BA4p", "BA6",
@@ -107,16 +115,24 @@ def create_ba_maps_wf(name="Brodmann_Area_Maps", th3=True):
107115

108116
if threshold:
109117
label2annot.inputs.out_annot = "BA_exvivo.thresh"
110-
ba_WF.connect([(stats_node, outputSpec, [('out_color',
118+
ba_WF.connect([(stats_node, outputspec, [('out_color',
111119
'{0}_thresh_color'.format(hemisphere)),
112120
('out_table',
113-
'{0}_thresh_table'.format(hemisphere))])])
121+
'{0}_thresh_table'.format(hemisphere))]),
122+
(label2annot, outputspec,
123+
[('out_file', '{0}_thresh_BAMaps_annotation'.format(hemisphere))]),
124+
(node, outputspec,
125+
[('out_file', '{0}_thresh_BAMaps_labels'.format(hemisphere))])])
114126
else:
115127
label2annot.inputs.out_annot = "BA_exvivo"
116-
ba_WF.connect([(stats_node, outputSpec, [('out_color',
128+
ba_WF.connect([(stats_node, outputspec, [('out_color',
117129
'{0}_color'.format(hemisphere)),
118130
('out_table',
119-
'{0}_table'.format(hemisphere))])])
131+
'{0}_table'.format(hemisphere))]),
132+
(label2annot, outputspec,
133+
[('out_file', '{0}_BAMaps_annotation'.format(hemisphere))]),
134+
(node, outputspec, [('out_file',
135+
'{0}_BAMaps_labels'.format(hemisphere))])])
120136

121137

122138
ba_WF.connect([(inputspec, node, [('{0}_sphere_reg'.format(hemisphere),

0 commit comments

Comments
 (0)