Skip to content

Commit a6aa19b

Browse files
name template for VolPad interface
1 parent dbc611b commit a6aa19b

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

nipype/interfaces/minc/minc.py

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,7 +2824,10 @@ class VolpadInputSpec(CommandLineInputSpec):
28242824
desc='output file',
28252825
genfile=True,
28262826
argstr='%s',
2827-
position=-1,)
2827+
position=-1,
2828+
name_source=['input_file'],
2829+
hash_files=False,
2830+
name_template='%s_volpad.mnc')
28282831

28292832
verbose = traits.Bool(
28302833
desc='Print out log messages. Default: False.',
@@ -2876,26 +2879,6 @@ class Volpad(CommandLine):
28762879
output_spec = VolpadOutputSpec
28772880
_cmd = 'volpad'
28782881

2879-
def _gen_filename(self, name):
2880-
if name == 'output_file':
2881-
output_file = self.inputs.output_file
2882-
2883-
if isdefined(output_file):
2884-
return os.path.abspath(output_file)
2885-
else:
2886-
return aggregate_filename(
2887-
[self.inputs.input_file], 'volpad_output')
2888-
else:
2889-
raise NotImplemented
2890-
2891-
def _gen_outfilename(self):
2892-
return self._gen_filename('output_file')
2893-
2894-
def _list_outputs(self):
2895-
outputs = self.output_spec().get()
2896-
outputs['output_file'] = os.path.abspath(self._gen_outfilename())
2897-
return outputs
2898-
28992882

29002883
class VolisoInputSpec(CommandLineInputSpec):
29012884

0 commit comments

Comments
 (0)