From 61fa9f144fb3ac57111c6e8aeef7450866593a05 Mon Sep 17 00:00:00 2001 From: oesteban Date: Thu, 11 May 2017 14:58:05 -0700 Subject: [PATCH 1/2] [ENH] Enable num_threads for antsAffineInitializer This PR just enables the general control for number of threads for this tool. I just learned that it works differently depending on it https://github.com/stnava/ANTs/issues/444 --- nipype/interfaces/ants/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/ants/utils.py b/nipype/interfaces/ants/utils.py index db287e6b68..d356f727dd 100644 --- a/nipype/interfaces/ants/utils.py +++ b/nipype/interfaces/ants/utils.py @@ -181,7 +181,7 @@ def _list_outputs(self): return outputs -class AffineInitializerInputSpec(CommandLineInputSpec): +class AffineInitializerInputSpec(ANTSCommandInputSpec): dimension = traits.Enum(3, 2, usedefault=True, position=0, argstr='%s', desc='dimension') fixed_image = File(exists=True, mandatory=True, position=1, argstr='%s', @@ -207,7 +207,7 @@ class AffineInitializerOutputSpec(TraitedSpec): out_file = File(desc='output transform file') -class AffineInitializer(CommandLine): +class AffineInitializer(ANTSCommand): """ Initialize an affine transform (as in antsBrainExtraction.sh) From f82d4c832c68a17d6c98fc4c75c3159527e2fbc4 Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 12 May 2017 09:19:26 -0700 Subject: [PATCH 2/2] update specs --- nipype/interfaces/ants/tests/test_auto_AffineInitializer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py b/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py index 2c1f05f864..319798e13f 100644 --- a/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py +++ b/nipype/interfaces/ants/tests/test_auto_AffineInitializer.py @@ -28,6 +28,9 @@ def test_AffineInitializer_inputs(): mandatory=True, position=2, ), + num_threads=dict(nohash=True, + usedefault=True, + ), out_file=dict(argstr='%s', position=3, usedefault=True,