Skip to content

Commit dbc611b

Browse files
name template for VolCentre interface
1 parent d9ca533 commit dbc611b

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
@@ -2740,7 +2740,10 @@ class VolcentreInputSpec(CommandLineInputSpec):
27402740
desc='output file',
27412741
genfile=True,
27422742
argstr='%s',
2743-
position=-1,)
2743+
position=-1,
2744+
name_source=['input_file'],
2745+
hash_files=False,
2746+
name_template='%s_volcentre.mnc')
27442747

27452748
verbose = traits.Bool(
27462749
desc='Print out log messages. Default: False.',
@@ -2785,26 +2788,6 @@ class Volcentre(CommandLine):
27852788
output_spec = VolcentreOutputSpec
27862789
_cmd = 'volcentre'
27872790

2788-
def _gen_filename(self, name):
2789-
if name == 'output_file':
2790-
output_file = self.inputs.output_file
2791-
2792-
if isdefined(output_file):
2793-
return os.path.abspath(output_file)
2794-
else:
2795-
return aggregate_filename(
2796-
[self.inputs.input_file], 'volcentre_output')
2797-
else:
2798-
raise NotImplemented
2799-
2800-
def _gen_outfilename(self):
2801-
return self._gen_filename('output_file')
2802-
2803-
def _list_outputs(self):
2804-
outputs = self.output_spec().get()
2805-
outputs['output_file'] = os.path.abspath(self._gen_outfilename())
2806-
return outputs
2807-
28082791

28092792
class VolpadInputSpec(CommandLineInputSpec):
28102793
"""

0 commit comments

Comments
 (0)