From d5137c30c8bdfc5e28ce0519e6a2581514d777f5 Mon Sep 17 00:00:00 2001 From: Eric Condamine <37933899+servoz@users.noreply.github.com> Date: Tue, 11 Dec 2018 11:00:20 +0100 Subject: [PATCH] Wrong last tuple in the channel_info parameter In SPM, the spm.spatial.preproc.channel.write parameter (SPM's Save Bias Corrected parameter) takes [Save Bias Field = 0 or 1, Save Bias Corrected = 0 or 1]. In nypipe the initialisation of the outputs bias_field_images and bias_corrected_images are done with the inverse order. This commit fix this inconsistency. --- nipype/interfaces/spm/preprocess.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nipype/interfaces/spm/preprocess.py b/nipype/interfaces/spm/preprocess.py index d23887c890..2188824022 100644 --- a/nipype/interfaces/spm/preprocess.py +++ b/nipype/interfaces/spm/preprocess.py @@ -1487,7 +1487,7 @@ class NewSegmentInputSpec(SPMCommandInputSpec): desc="""A tuple with the following fields: - bias reguralisation (0-10) - FWHM of Gaussian smoothness of bias - - which maps to save (Corrected, Field) - a tuple of two boolean values""", + - which maps to save (Field, Corrected) - a tuple of two boolean values""", field='channel') tissues = traits.List( traits.Tuple( @@ -1681,11 +1681,11 @@ def _list_outputs(self): if isdefined(self.inputs.channel_info): if self.inputs.channel_info[2][0]: - outputs['bias_corrected_images'].append( - os.path.join(pth, "m%s.nii" % (base))) - if self.inputs.channel_info[2][1]: outputs['bias_field_images'].append( os.path.join(pth, "BiasField_%s.nii" % (base))) + if self.inputs.channel_info[2][1]: + outputs['bias_corrected_images'].append( + os.path.join(pth, "m%s.nii" % (base))) return outputs