Skip to content

Commit 5c4a618

Browse files
name template for Blob interface
1 parent ae7a618 commit 5c4a618

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

nipype/interfaces/minc/minc.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,10 @@ class BlobInputSpec(CommandLineInputSpec):
893893
desc='output file',
894894
genfile=True,
895895
argstr='%s',
896-
position=-1,)
896+
position=-1,
897+
name_source=['input_file'],
898+
hash_files=False,
899+
name_template='%s_blob.mnc')
897900

898901
trace = traits.Bool(
899902
desc='compute the trace (approximate growth and shrinkage) -- FAST',
@@ -930,25 +933,6 @@ class Blob(CommandLine):
930933
output_spec = BlobOutputSpec
931934
_cmd = 'mincblob'
932935

933-
def _gen_filename(self, name):
934-
if name == 'output_file':
935-
output_file = self.inputs.output_file
936-
937-
if isdefined(output_file):
938-
return os.path.abspath(output_file)
939-
else:
940-
return aggregate_filename([self.inputs.input_file], 'blob')
941-
else:
942-
raise NotImplemented
943-
944-
def _gen_outfilename(self):
945-
return self._gen_filename('output_file')
946-
947-
def _list_outputs(self):
948-
outputs = self.output_spec().get()
949-
outputs['output_file'] = os.path.abspath(self._gen_outfilename())
950-
return outputs
951-
952936

953937
class CalcInputSpec(CommandLineInputSpec):
954938
_xor_input_files = ('input_files', 'filelist')

0 commit comments

Comments
 (0)