@@ -1155,6 +1155,8 @@ class BBRegisterInputSpec(FSTraitedSpec):
1155
1155
desc = 'degrees of freedom for initial registration (FSL)' )
1156
1156
out_fsl_file = traits .Either (traits .Bool , File , argstr = "--fslmat %s" ,
1157
1157
desc = "write the transformation matrix in FSL FLIRT format" )
1158
+ out_lta_file = traits .Either (traits .Bool , File , argstr = "--lta %s" , min_ver = '5.2.0' ,
1159
+ desc = "write the transformation matrix in LTA format" )
1158
1160
registered_file = traits .Either (traits .Bool , File , argstr = '--o %s' ,
1159
1161
desc = 'output warped sourcefile either True or filename' )
1160
1162
@@ -1171,6 +1173,7 @@ class BBRegisterInputSpec6(BBRegisterInputSpec):
1171
1173
class BBRegisterOutputSpec (TraitedSpec ):
1172
1174
out_reg_file = File (exists = True , desc = 'Output registration file' )
1173
1175
out_fsl_file = File (desc = 'Output FLIRT-style registration file' )
1176
+ out_lta_file = File (desc = 'Output LTA-style registration file' )
1174
1177
min_cost_file = File (exists = True , desc = 'Output registration minimum cost file' )
1175
1178
registered_file = File (desc = 'Registered and resampled source file' )
1176
1179
@@ -1219,6 +1222,16 @@ def _list_outputs(self):
1219
1222
else :
1220
1223
outputs ['registered_file' ] = op .abspath (_in .registered_file )
1221
1224
1225
+ if isdefined (_in .out_lta_file ):
1226
+ if isinstance (_in .out_fsl_file , bool ):
1227
+ suffix = '_bbreg_%s.lta' % _in .subject_id
1228
+ out_lta_file = fname_presuffix (_in .source_file ,
1229
+ suffix = suffix ,
1230
+ use_ext = False )
1231
+ outputs ['out_lta_file' ] = out_lta_file
1232
+ else :
1233
+ outputs ['out_lta_file' ] = op .abspath (_in .out_lta_file )
1234
+
1222
1235
if isdefined (_in .out_fsl_file ):
1223
1236
if isinstance (_in .out_fsl_file , bool ):
1224
1237
suffix = '_bbreg_%s.mat' % _in .subject_id
@@ -1234,7 +1247,7 @@ def _list_outputs(self):
1234
1247
1235
1248
def _format_arg (self , name , spec , value ):
1236
1249
1237
- if name in ['registered_file' , 'out_fsl_file' ]:
1250
+ if name in ['registered_file' , 'out_fsl_file' , 'out_lta_file' ]:
1238
1251
if isinstance (value , bool ):
1239
1252
fname = self ._list_outputs ()[name ]
1240
1253
else :
0 commit comments