Skip to content

Commit f2f18ed

Browse files
committed
ENH: Add --sep option to mri_coreg
1 parent a3028a1 commit f2f18ed

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

nipype/interfaces/freesurfer/registration.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ class MRICoregInputSpec(FSTraitedSpec):
372372
desc='turn off coordinate dithering')
373373
no_intensity_dithering = traits.Bool(argstr='--no-intensity-dither',
374374
desc='turn off intensity dithering')
375-
# Skipping: --sep
375+
sep = traits.List(argstr='--sep %s...', minlen=1, maxlen=2,
376+
desc='set spatial scales, in voxels (default [2, 4])')
376377
initial_translation = traits.Tuple(
377378
traits.Float, traits.Float, traits.Float, argstr='--trans %g %g %g',
378379
desc='initial translation in mm (implies no_cras0)')
@@ -444,6 +445,16 @@ class MRICoreg(FSCommand):
444445
>>> coreg.inputs.reference_mask = False
445446
>>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS
446447
'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --mov moving1.nii --sd .'
448+
449+
Spatial scales may be specified as a list of one or two separations:
450+
451+
>>> coreg.inputs.sep = [4]
452+
>>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS
453+
'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --sep 4 --mov moving1.nii --sd .'
454+
455+
>>> coreg.inputs.sep = [4, 5]
456+
>>> coreg.cmdline # doctest: +ALLOW_UNICODE +ELLIPSIS
457+
'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --ref fixed1.nii --sep 4 --sep 5 --mov moving1.nii --sd .'
447458
"""
448459

449460
_cmd = 'mri_coreg'

nipype/interfaces/freesurfer/tests/test_auto_MRICoreg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def test_MRICoreg_inputs():
6666
),
6767
saturation_threshold=dict(argstr='--sat %g',
6868
),
69+
sep=dict(argstr='--sep %s...',
70+
),
6971
source_file=dict(argstr='--mov %s',
7072
copyfile=False,
7173
mandatory=True,

0 commit comments

Comments
 (0)