@@ -3084,7 +3084,7 @@ def _normalize_filenames(self):
30843084
30853085class LTAConvertInputSpec (CommandLineInputSpec ):
30863086 # 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' )
30883088 in_lta = traits .Either (
30893089 File (exists = True ), 'identity.nofile' , argstr = '--inlta %s' ,
30903090 mandatory = True , xor = _in_xor , desc = 'input transform of LTA type' )
@@ -3100,6 +3100,9 @@ class LTAConvertInputSpec(CommandLineInputSpec):
31003100 in_niftyreg = File (
31013101 exists = True , argstr = '--inniftyreg %s' , mandatory = True , xor = _in_xor ,
31023102 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' )
31033106 # Outputs
31043107 out_lta = traits .Either (
31053108 traits .Bool , File , argstr = '--outlta %s' ,
@@ -3110,6 +3113,8 @@ class LTAConvertInputSpec(CommandLineInputSpec):
31103113 desc = 'output transform in MNI/XFM format' )
31113114 out_reg = traits .Either (traits .Bool , File , argstr = '--outreg %s' ,
31123115 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' )
31133118 # Optional flags
31143119 invert = traits .Bool (argstr = '--invert' )
31153120 ltavox2vox = traits .Bool (argstr = '--ltavox2vox' , requires = ['out_lta' ])
@@ -3124,6 +3129,7 @@ class LTAConvertOutputSpec(TraitedSpec):
31243129 out_fsl = File (exists = True , desc = 'output transform in FSL format' )
31253130 out_mni = File (exists = True , desc = 'output transform in MNI/XFM format' )
31263131 out_reg = File (exists = True , desc = 'output transform in reg dat format' )
3132+ out_itk = File (exists = True , desc = 'output transform in ITK format' )
31273133
31283134
31293135class LTAConvert (CommandLine ):
@@ -3146,7 +3152,8 @@ def _format_arg(self, name, spec, value):
31463152 def _list_outputs (self ):
31473153 outputs = self .output_spec ().get ()
31483154 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' )):
31503157 attr = getattr (self .inputs , name )
31513158 if attr :
31523159 fname = default if attr is True else attr
0 commit comments