Skip to content

Commit a7de3ea

Browse files
name template for Beast interface
1 parent 7f6ff7c commit a7de3ea

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

nipype/interfaces/minc/minc.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,11 +1366,13 @@ class BeastInputSpec(CommandLineInputSpec):
13661366
desc='output file',
13671367
position=-1,
13681368
argstr='%s',
1369-
genfile=True)
1369+
name_source=['input_file'],
1370+
hash_files=False,
1371+
name_template='%s_beast_mask.mnc')
13701372

13711373

13721374
class BeastOutputSpec(TraitedSpec):
1373-
output_file = File(desc='output file in raw/text format', exists=True)
1375+
output_file = File(desc='output mask file', exists=True)
13741376

13751377

13761378
class Beast(CommandLine):
@@ -1392,20 +1394,6 @@ class Beast(CommandLine):
13921394
output_spec = BeastOutputSpec
13931395
_cmd = 'mincbeast'
13941396

1395-
# FIXME Does this play nicely with a workflow?
1396-
def _gen_outfilename(self):
1397-
output_file = self.inputs.output_file
1398-
1399-
if isdefined(output_file):
1400-
return output_file
1401-
else:
1402-
return os.path.splitext(self.inputs.input_file)[0] + '_mask.mnc'
1403-
1404-
def _list_outputs(self):
1405-
outputs = self.output_spec().get()
1406-
outputs['output_file'] = os.path.abspath(self._gen_outfilename())
1407-
return outputs
1408-
14091397

14101398
class PikInputSpec(CommandLineInputSpec):
14111399
input_file = File(

0 commit comments

Comments
 (0)