Skip to content

Commit efd3850

Browse files
name templates for Reshape interface
1 parent c43c621 commit efd3850

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
@@ -3524,7 +3524,10 @@ class ReshapeInputSpec(CommandLineInputSpec):
35243524
desc='output file',
35253525
genfile=True,
35263526
argstr='%s',
3527-
position=-1,)
3527+
position=-1,
3528+
name_source=['input_file'],
3529+
hash_files=False,
3530+
name_template='%s_reshape.mnc')
35283531

35293532
verbose = traits.Bool(
35303533
desc='Print out log messages. Default: False.',
@@ -3568,26 +3571,6 @@ class Reshape(CommandLine):
35683571
output_spec = ReshapeOutputSpec
35693572
_cmd = 'mincreshape'
35703573

3571-
def _gen_filename(self, name):
3572-
if name == 'output_file':
3573-
output_file = self.inputs.output_file
3574-
3575-
if isdefined(output_file):
3576-
return os.path.abspath(output_file)
3577-
else:
3578-
return aggregate_filename(
3579-
[self.inputs.input_file], 'reshape_output')
3580-
else:
3581-
raise NotImplemented
3582-
3583-
def _gen_outfilename(self):
3584-
return self._gen_filename('output_file')
3585-
3586-
def _list_outputs(self):
3587-
outputs = self.output_spec().get()
3588-
outputs['output_file'] = os.path.abspath(self._gen_outfilename())
3589-
return outputs
3590-
35913574

35923575
class VolSymmInputSpec(CommandLineInputSpec):
35933576
input_file = traits.File(

0 commit comments

Comments
 (0)