@@ -3084,7 +3084,7 @@ def _normalize_filenames(self):
3084
3084
3085
3085
class LTAConvertInputSpec (CommandLineInputSpec ):
3086
3086
# Inputs
3087
- _in_xor = ('in_lta' , 'in_fsl' , 'in_mni' , 'in_reg' , 'in_niftyreg' )
3087
+ _in_xor = ('in_lta' , 'in_fsl' , 'in_mni' , 'in_reg' , 'in_niftyreg' , 'in_itk' )
3088
3088
in_lta = traits .Either (
3089
3089
File (exists = True ), 'identity.nofile' , argstr = '--inlta %s' ,
3090
3090
mandatory = True , xor = _in_xor , desc = 'input transform of LTA type' )
@@ -3100,6 +3100,9 @@ class LTAConvertInputSpec(CommandLineInputSpec):
3100
3100
in_niftyreg = File (
3101
3101
exists = True , argstr = '--inniftyreg %s' , mandatory = True , xor = _in_xor ,
3102
3102
desc = 'input transform of Nifty Reg type (inverse RAS2RAS)' )
3103
+ in_itk = File (
3104
+ exists = True , argstr = '--initk %s' , mandatory = True , xor = _in_xor ,
3105
+ desc = 'input transform of ITK type' )
3103
3106
# Outputs
3104
3107
out_lta = traits .Either (
3105
3108
traits .Bool , File , argstr = '--outlta %s' ,
@@ -3110,6 +3113,8 @@ class LTAConvertInputSpec(CommandLineInputSpec):
3110
3113
desc = 'output transform in MNI/XFM format' )
3111
3114
out_reg = traits .Either (traits .Bool , File , argstr = '--outreg %s' ,
3112
3115
desc = 'output transform in reg dat format' )
3116
+ out_itk = traits .Either (traits .Bool , File , argstr = '--outitk %s' ,
3117
+ desc = 'output transform in ITK format' )
3113
3118
# Optional flags
3114
3119
invert = traits .Bool (argstr = '--invert' )
3115
3120
ltavox2vox = traits .Bool (argstr = '--ltavox2vox' , requires = ['out_lta' ])
@@ -3124,6 +3129,7 @@ class LTAConvertOutputSpec(TraitedSpec):
3124
3129
out_fsl = File (exists = True , desc = 'output transform in FSL format' )
3125
3130
out_mni = File (exists = True , desc = 'output transform in MNI/XFM format' )
3126
3131
out_reg = File (exists = True , desc = 'output transform in reg dat format' )
3132
+ out_itk = File (exists = True , desc = 'output transform in ITK format' )
3127
3133
3128
3134
3129
3135
class LTAConvert (CommandLine ):
@@ -3146,7 +3152,8 @@ def _format_arg(self, name, spec, value):
3146
3152
def _list_outputs (self ):
3147
3153
outputs = self .output_spec ().get ()
3148
3154
for name , default in (('out_lta' , 'out.lta' ), ('out_fsl' , 'out.mat' ),
3149
- ('out_mni' , 'out.xfm' ), ('out_reg' , 'out.dat' )):
3155
+ ('out_mni' , 'out.xfm' ), ('out_reg' , 'out.dat' ),
3156
+ ('out_itk' , 'out.txt' )):
3150
3157
attr = getattr (self .inputs , name )
3151
3158
if attr :
3152
3159
fname = default if attr is True else attr
0 commit comments