Skip to content

Commit 748f61b

Browse files
committed
STYLE: Provide consistent input/output names
For a program that allows the user to specify an output filename, the InputSpec and OutputSpec should use the same name for consistency.
1 parent 5e03d93 commit 748f61b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nipype/interfaces/freesurfer/model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ class MS_LDAInputSpec(FSTraitedSpec):
780780
desc='pair of class labels to optimize')
781781
weight_file = traits.File(argstr='-weight %s', mandatory=True,
782782
desc='filename for the LDA weights (input or output)')
783-
output_synth = traits.File(exists=False, argstr='-synth %s',
783+
vol_synth_file = traits.File(exists=False, argstr='-synth %s',
784784
mandatory=True,
785785
desc='filename for the synthesized output volume')
786786
label_file = traits.File(exists=True, argstr='-label %s',
@@ -816,11 +816,11 @@ class MS_LDA(FSCommand):
816816
>>> zero_value = 1
817817
>>> optimalWeights = MS_LDA(lda_labels=[grey_label, white_label], \
818818
label_file='label.mgz', weight_file='weights.txt', \
819-
shift=zero_value, output_synth='synth_out.mgz', \
819+
shift=zero_value, vol_synth_file='synth_out.mgz', \
820820
conform=True, use_weights=True, \
821821
images=['FLASH1.mgz', 'FLASH2.mgz', 'FLASH3.mgz'])
822822
>>> 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'
823+
'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'
824824
"""
825825

826826
_cmd = 'mri_ms_LDA'
@@ -829,7 +829,7 @@ class MS_LDA(FSCommand):
829829

830830
def _list_outputs(self):
831831
outputs = self._outputs().get()
832-
outputs['vol_synth_file'] = os.path.abspath(self.inputs.output_synth)
832+
outputs['vol_synth_file'] = os.path.abspath(self.inputs.vol_synth_file)
833833
if not isdefined(self.inputs.use_weights) or self.inputs.use_weights is False:
834834
outputs['weight_file'] = os.path.abspath(self.inputs.weight_file)
835835
return outputs

0 commit comments

Comments
 (0)