Skip to content

Commit e8aa182

Browse files
committed
fix: apply suggestions from @oesteban review
1 parent 3ae1642 commit e8aa182

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nitransforms/cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def cli_apply(pargs):
1212
"""
13-
Apply a transformation to an image, resampling on the reference
13+
Apply a transformation to an image, resampling on the reference.
1414
1515
Sample usage:
1616
@@ -20,12 +20,12 @@ def cli_apply(pargs):
2020
2121
"""
2222
fmt = pargs.fmt or pargs.transform.split('.')[-1]
23-
if fmt == 'tfm':
23+
if fmt in ('tfm', 'mat', 'h5', 'x5'):
2424
fmt = 'itk'
2525
elif fmt == 'lta':
2626
fmt = 'fs'
2727

28-
if fmt not in ('fs', 'itk', 'fsl', 'afni'):
28+
if fmt not in ('fs', 'itk', 'fsl', 'afni', 'x5'):
2929
raise ValueError(
3030
"Cannot determine transformation format, manually set format with the `--fmt` flag"
3131
)
@@ -83,7 +83,7 @@ def _add_subparser(name, description):
8383
applyp.add_argument('--ref', help='The reference space to resample onto')
8484
applyp.add_argument(
8585
'--fmt',
86-
choices=('itk', 'fsl', 'afni', 'fs'),
86+
choices=('itk', 'fsl', 'afni', 'fs', 'x5'),
8787
help='Format of transformation. If no option is passed, nitransforms will '
8888
'estimate based on the transformation file extension.'
8989
)

0 commit comments

Comments
 (0)