@@ -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' ,
@@ -221,6 +224,7 @@ class TOPUPOutputSpec(TraitedSpec):
221224 out_field = File (desc = 'name of image file with field (Hz)' )
222225 out_warps = traits .List (File (exists = True ), desc = 'warpfield images' )
223226 out_jacs = traits .List (File (exists = True ), desc = 'Jacobian images' )
227+ out_mats = traits .List (File (exists = True ), desc = 'realignment matrices' )
224228 out_corrected = File (desc = 'name of 4D image file with unwarped images' )
225229 out_logfile = File (desc = 'name of log-file' )
226230
@@ -247,7 +251,7 @@ class TOPUP(FSLCommand):
247251 'topup --config=b02b0.cnf --datain=topup_encoding.txt \
248252 --imain=b0_b0rev.nii --out=b0_b0rev_base --iout=b0_b0rev_corrected.nii.gz \
249253 --fout=b0_b0rev_field.nii.gz --jacout=jac --logout=b0_b0rev_topup.log \
250- --dfout=warpfield'
254+ --rbmout=xfm -- dfout=warpfield'
251255 >>> res = topup.run() # doctest: +SKIP
252256
253257 """
@@ -289,6 +293,9 @@ def _list_outputs(self):
289293 outputs ['out_jacs' ] = [
290294 fmt (prefix = self .inputs .out_jac_prefix , i = i , ext = ext )
291295 for i in range (1 , n_vols + 1 )]
296+ outputs ['out_mats' ] = [
297+ fmt (prefix = self .inputs .out_mat_prefix , i = i , ext = ".mat" )
298+ for i in range (1 , n_vols + 1 )]
292299
293300 if isdefined (self .inputs .encoding_direction ):
294301 outputs ['out_enc_file' ] = self ._get_encfilename ()
0 commit comments