Skip to content

Commit e1087ad

Browse files
authored
Use name_source in ConcatenateLTA
Adds `name_source` to the `out_file` input of `ConcatenateLTA`.
1 parent 66411f4 commit e1087ad

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,8 +2387,8 @@ class ConcatenateLTAInputSpec(FSTraitedSpec):
23872387
File(exists=True), 'identity.nofile', argstr='%s', position=-2,
23882388
mandatory=True, desc='maps dst1(src2) to dst2')
23892389
out_file = File(
2390-
'concat.lta', usedefault=True, position=-1, argstr='%s',
2391-
hash_files=False,
2390+
position=-1, argstr='%s', hash_files=False, name_source=['in_lta1'],
2391+
name_template='%s_concat', keep_extension=True,
23922392
desc='the combined LTA maps: src1 to dst2 = LTA2*LTA1')
23932393

23942394
# Inversion and transform type
@@ -2434,7 +2434,7 @@ class ConcatenateLTA(FSCommand):
24342434
>>> conc_lta.inputs.in_lta1 = 'lta1.lta'
24352435
>>> conc_lta.inputs.in_lta2 = 'lta2.lta'
24362436
>>> conc_lta.cmdline # doctest: +ALLOW_UNICODE
2437-
'mri_concatenate_lta lta1.lta lta2.lta concat.lta'
2437+
'mri_concatenate_lta lta1.lta lta2.lta lta1_concat.lta'
24382438
24392439
You can use 'identity.nofile' as the filename for in_lta2, e.g.:
24402440
@@ -2459,8 +2459,3 @@ def _format_arg(self, name, spec, value):
24592459
if name == 'out_type':
24602460
value = {'VOX2VOX': 0, 'RAS2RAS': 1}[value]
24612461
return super(ConcatenateLTA, self)._format_arg(name, spec, value)
2462-
2463-
def _list_outputs(self):
2464-
outputs = self.output_spec().get()
2465-
outputs['out_file'] = os.path.abspath(self.inputs.out_file)
2466-
return outputs

0 commit comments

Comments
 (0)