Skip to content

Commit 692b6ae

Browse files
committed
address thresholding comment from @oesteban
1 parent e4e2ea0 commit 692b6ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nipype/workflows/dmri/fsl/utils.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ def dwi_flirt(name='DWICoregistration', excl_nodiff=False, flirt_param={}):
133133
name='ApplyXFMs',
134134
iterfield=['in_file', 'in_matrix_file']
135135
)
136+
thres = pe.MapNode(
137+
fsl.Threshold(thresh=0.0),
138+
iterfield=['in_file'],
139+
name='RemoveNegative')
136140
merge = pe.Node(fsl.Merge(dimension='t'), name='MergeDWIs')
137141
outputnode = pe.Node(
138142
niu.IdentityInterface(fields=['out_file', 'out_xfms']),
@@ -157,7 +161,8 @@ def dwi_flirt(name='DWICoregistration', excl_nodiff=False, flirt_param={}):
157161
(enhdw, flirt, [('out_file', 'in_file')]),
158162
(initmat, flirt, [('init_xfms', 'in_matrix_file')]),
159163
(flirt, apply_xfms, [('out_matrix_file', 'in_matrix_file')]),
160-
(apply_xfms, merge, [('out_file', 'in_files')]),
164+
(apply_xfms, thres, [('out_file', 'in_file')]),
165+
(thres, merge, [('out_file', 'in_files')]),
161166
(merge, outputnode, [('merged_file', 'out_file')]),
162167
(flirt, outputnode, [('out_matrix_file', 'out_xfms')])
163168
])

0 commit comments

Comments
 (0)