Skip to content

Commit eb524e5

Browse files
committed
Include realignment matrices in TOPUP outputs
1 parent 5040260 commit eb524e5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

nipype/interfaces/fsl/epi.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ class TOPUPInputSpec(FSLCommandInputSpec):
143143
out_warp_prefix = traits.Str("warpfield", argstr='--dfout=%s', hash_files=False,
144144
desc='prefix for the warpfield images (in mm)',
145145
usedefault=True)
146+
out_mat_prefix = traits.Str("xfm", argstr='--rbmout=%s', hash_files=False,
147+
desc='prefix for the realignment matrices',
148+
usedefault=True)
146149
out_jac_prefix = traits.Str("jac", argstr='--jacout=%s',
147150
hash_files=False,
148151
desc='prefix for the warpfield images',
@@ -247,7 +250,7 @@ class TOPUP(FSLCommand):
247250
'topup --config=b02b0.cnf --datain=topup_encoding.txt \
248251
--imain=b0_b0rev.nii --out=b0_b0rev_base --iout=b0_b0rev_corrected.nii.gz \
249252
--fout=b0_b0rev_field.nii.gz --jacout=jac --logout=b0_b0rev_topup.log \
250-
--dfout=warpfield'
253+
--rbmout=xfm --dfout=warpfield'
251254
>>> res = topup.run() # doctest: +SKIP
252255
253256
"""
@@ -289,6 +292,9 @@ def _list_outputs(self):
289292
outputs['out_jacs'] = [
290293
fmt(prefix=self.inputs.out_jac_prefix, i=i, ext=ext)
291294
for i in range(1, n_vols + 1)]
295+
output['out_mats'] = [
296+
fmt(prefix=self.inputs.out_mat_prefix, i=i, ext=".mat")
297+
for i in range(1, n_vols + 1)]
292298

293299
if isdefined(self.inputs.encoding_direction):
294300
outputs['out_enc_file'] = self._get_encfilename()

nipype/interfaces/fsl/tests/test_auto_TOPUP.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ def test_TOPUP_inputs():
6464
name_source=['in_file'],
6565
name_template='%s_topup.log',
6666
),
67+
out_mat_prefix=dict(argstr='--rbmout=%s',
68+
hash_files=False,
69+
usedefault=True,
70+
),
6771
out_warp_prefix=dict(argstr='--dfout=%s',
6872
hash_files=False,
6973
usedefault=True,

0 commit comments

Comments
 (0)