Skip to content

ENH: --out_itk option for LTAConvert #2176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 7, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,11 @@
"name": "Lukas Snoek",
"orcid": "0000-0001-8972-204X"
}
{
"affiliation": "Vrije Universiteit, Amsterdam",
"name": "Gilles de Hollander",
"orcid": "0000-0003-1988-5091"
}
],
"keywords": [
"neuroimaging",
Expand Down
2 changes: 2 additions & 0 deletions nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def test_LTAConvert_inputs():
),
out_reg=dict(argstr='--outreg %s',
),
out_itk=dict(argstr='--outitk %s',
),
source_file=dict(argstr='--src %s',
),
target_conform=dict(argstr='--trgconform',
Expand Down
6 changes: 5 additions & 1 deletion nipype/interfaces/freesurfer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3110,6 +3110,8 @@ class LTAConvertInputSpec(CommandLineInputSpec):
desc='output transform in MNI/XFM format')
out_reg = traits.Either(traits.Bool, File, argstr='--outreg %s',
desc='output transform in reg dat format')
out_itk = traits.Either(traits.Bool, File, argstr='--outitk %s',
desc='output transform in ITK format')
# Optional flags
invert = traits.Bool(argstr='--invert')
ltavox2vox = traits.Bool(argstr='--ltavox2vox', requires=['out_lta'])
Expand All @@ -3124,6 +3126,7 @@ class LTAConvertOutputSpec(TraitedSpec):
out_fsl = File(exists=True, desc='output transform in FSL format')
out_mni = File(exists=True, desc='output transform in MNI/XFM format')
out_reg = File(exists=True, desc='output transform in reg dat format')
out_itk = File(exists=True, desc='output transform in ITK format')


class LTAConvert(CommandLine):
Expand All @@ -3146,7 +3149,8 @@ def _format_arg(self, name, spec, value):
def _list_outputs(self):
outputs = self.output_spec().get()
for name, default in (('out_lta', 'out.lta'), ('out_fsl', 'out.mat'),
('out_mni', 'out.xfm'), ('out_reg', 'out.dat')):
('out_mni', 'out.xfm'), ('out_reg', 'out.dat'),
('out_itk', 'out.txt')):
attr = getattr(self.inputs, name)
if attr:
fname = default if attr is True else attr
Expand Down