@@ -782,7 +782,14 @@ class MS_LDAInputSpec(FSTraitedSpec):
782
782
desc = 'filename for the LDA weights (input or output)' )
783
783
output_synth = traits .File (exists = False , argstr = '-synth %s' ,
784
784
mandatory = True ,
785
- desc = 'filename for the synthesized output volume' )
785
+ desc = 'filename for the synthesized output volume' ,
786
+ deprecated = '0.8' ,
787
+ new_name = 'vol_synth_file' ,
788
+ xor = ['vol_synth_file' , 'output_synth' ])
789
+ vol_synth_file = traits .File (exists = False , argstr = '-synth %s' ,
790
+ mandatory = True ,
791
+ desc = 'filename for the synthesized output volume' ,
792
+ xor = ['vol_synth_file' , 'output_synth' ])
786
793
label_file = traits .File (exists = True , argstr = '-label %s' ,
787
794
desc = 'filename of the label volume' )
788
795
mask_file = traits .File (exists = True , argstr = '-mask %s' ,
@@ -816,11 +823,11 @@ class MS_LDA(FSCommand):
816
823
>>> zero_value = 1
817
824
>>> optimalWeights = MS_LDA(lda_labels=[grey_label, white_label], \
818
825
label_file='label.mgz', weight_file='weights.txt', \
819
- shift=zero_value, output_synth ='synth_out.mgz', \
826
+ shift=zero_value, vol_synth_file ='synth_out.mgz', \
820
827
conform=True, use_weights=True, \
821
828
images=['FLASH1.mgz', 'FLASH2.mgz', 'FLASH3.mgz'])
822
829
>>> optimalWeights.cmdline
823
- 'mri_ms_LDA -conform -label label.mgz -lda 2 3 -synth synth_out.mgz - shift 1 -W -weight weights.txt FLASH1.mgz FLASH2.mgz FLASH3.mgz'
830
+ 'mri_ms_LDA -conform -label label.mgz -lda 2 3 -shift 1 -W -synth synth_out.mgz -weight weights.txt FLASH1.mgz FLASH2.mgz FLASH3.mgz'
824
831
"""
825
832
826
833
_cmd = 'mri_ms_LDA'
@@ -829,7 +836,10 @@ class MS_LDA(FSCommand):
829
836
830
837
def _list_outputs (self ):
831
838
outputs = self ._outputs ().get ()
832
- outputs ['vol_synth_file' ] = os .path .abspath (self .inputs .output_synth )
839
+ if isdefined (self .inputs .output_synth ):
840
+ outputs ['vol_synth_file' ] = os .path .abspath (self .inputs .output_synth )
841
+ else :
842
+ outputs ['vol_synth_file' ] = os .path .abspath (self .inputs .vol_synth_file )
833
843
if not isdefined (self .inputs .use_weights ) or self .inputs .use_weights is False :
834
844
outputs ['weight_file' ] = os .path .abspath (self .inputs .weight_file )
835
845
return outputs
0 commit comments