From b726bfb8d624df78c8e7f9f3a4c143cd5b360151 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Sat, 25 Jun 2016 00:53:42 +0200 Subject: [PATCH] fix: more fast fixes --- nipype/interfaces/fsl/preprocess.py | 3 +++ nipype/interfaces/fsl/tests/test_preprocess.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/nipype/interfaces/fsl/preprocess.py b/nipype/interfaces/fsl/preprocess.py index 48dd34ff71..64d796539b 100644 --- a/nipype/interfaces/fsl/preprocess.py +++ b/nipype/interfaces/fsl/preprocess.py @@ -1573,6 +1573,9 @@ def _gen_fname(self, name): method = 'none' if isdefined(self.inputs.method) and self.inputs.method != 'none': method = 'fast' + if self.inputs.list_of_specific_structures and \ + self.inputs.method == 'auto': + method = 'none' if isdefined(self.inputs.method_as_numerical_threshold): thres = '%.4f' % self.inputs.method_as_numerical_threshold diff --git a/nipype/interfaces/fsl/tests/test_preprocess.py b/nipype/interfaces/fsl/tests/test_preprocess.py index 80a3d4db24..b52633b265 100644 --- a/nipype/interfaces/fsl/tests/test_preprocess.py +++ b/nipype/interfaces/fsl/tests/test_preprocess.py @@ -579,3 +579,8 @@ def test_first_genfname(): value = first._gen_fname(name='original_segmentations') expected_value = os.path.abspath('segment_all_none_origsegs.nii.gz') yield assert_equal, value, expected_value + first.inputs.method = 'auto' + first.inputs.list_of_specific_structures = ['L_Hipp', 'R_Hipp'] + value = first._gen_fname(name='original_segmentations') + expected_value = os.path.abspath('segment_all_none_origsegs.nii.gz') + yield assert_equal, value, expected_value