Skip to content

Commit

Permalink
TST: Fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd committed Dec 11, 2024
1 parent af4b3f3 commit 7bf02dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions nibabies/interfaces/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def _chdir(path):
'sub-01_run-01_echo-1_bold.nii.gz',
'sub-01_run-01_echo-2_bold.nii.gz',
'sub-01_run-01_echo-3_bold.nii.gz',
'xfm0.h5',
'xfm1.h5',
)


Expand Down
12 changes: 6 additions & 6 deletions nibabies/interfaces/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ class ConcatXFMOutputSpec(TraitedSpec):

class ConcatXFM(ANTSCommand):
"""
Streamed use of antsApplyTransforms to combine nonlinear xfms into a single file
Streamed use of antsApplyTransforms to combine multiple xfms into a single file
Examples
--------
>>> from nibabies.interfaces.patches import ConcatXFM
>>> cxfm = ConcatXFM()
>>> cxfm.inputs.transforms = ['xfm1.h5', 'xfm0.h5']
>>> cxfm.inputs.reference_image = 'sub-01_T1w.nii.gz'
>>> cxfm.cmdline
'antsApplyTransforms --output [ concat_xfm.h5, 1 ] --transform .../xfm1.h5 \
--transform .../xfm0.h5 --reference_image .../sub-01_T1w.nii.gz'
>>> cxfm.inputs.transforms = [testdir / 'xfm0.h5', testdir / 'xfm1.h5']
>>> cxfm.inputs.reference_image = testdir / 'anatomical.nii'
>>> cxfm.cmdline # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
'antsApplyTransforms --output [ concat_xfm.h5, 1 ] --reference-image .../anatomical.nii \
--transform .../xfm0.h5 --transform .../xfm1.h5'
"""

Expand Down

0 comments on commit 7bf02dd

Please sign in to comment.