diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index 7ab6b30c30..478b26dc36 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -585,7 +585,11 @@ class RegistrationInputSpec(ANTSCommandInputSpec): usedefault=True, desc="The Lower quantile to clip image ranges", ) - + random_seed = traits.Int( + argstr="--random-seed %d", + desc="Fixed seed for random number generation", + min_ver="2.3.0", + ) verbose = traits.Bool( argstr="-v", default_value=False, usedefault=True, nohash=True ) @@ -1708,6 +1712,11 @@ class RegistrationSynQuickInputSpec(ANTSCommandInputSpec): desc="precision type (default = double)", usedefault=True, ) + random_seed = traits.Int( + argstr="-e %d", + desc="fixed random seed", + min_ver="2.3.0", + ) class RegistrationSynQuickOutputSpec(TraitedSpec): diff --git a/nipype/interfaces/ants/tests/test_auto_Registration.py b/nipype/interfaces/ants/tests/test_auto_Registration.py index 507e0effe2..814948835c 100644 --- a/nipype/interfaces/ants/tests/test_auto_Registration.py +++ b/nipype/interfaces/ants/tests/test_auto_Registration.py @@ -115,6 +115,10 @@ def test_Registration_inputs(): requires=["metric_weight"], usedefault=True, ), + random_seed=dict( + argstr="--random-seed %d", + min_ver="2.3.0", + ), restore_state=dict( argstr="--restore-state %s", extensions=None, diff --git a/nipype/interfaces/ants/tests/test_auto_RegistrationSynQuick.py b/nipype/interfaces/ants/tests/test_auto_RegistrationSynQuick.py index c09f08d17a..c799f47299 100644 --- a/nipype/interfaces/ants/tests/test_auto_RegistrationSynQuick.py +++ b/nipype/interfaces/ants/tests/test_auto_RegistrationSynQuick.py @@ -39,6 +39,10 @@ def test_RegistrationSynQuick_inputs(): argstr="-p %s", usedefault=True, ), + random_seed=dict( + argstr="-e %d", + min_ver="2.3.0", + ), spline_distance=dict( argstr="-s %d", usedefault=True,