Skip to content

Commit d5137c3

Browse files
authored
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.
1 parent 1eeabd3 commit d5137c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nipype/interfaces/spm/preprocess.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ class NewSegmentInputSpec(SPMCommandInputSpec):
14871487
desc="""A tuple with the following fields:
14881488
- bias reguralisation (0-10)
14891489
- FWHM of Gaussian smoothness of bias
1490-
- which maps to save (Corrected, Field) - a tuple of two boolean values""",
1490+
- which maps to save (Field, Corrected) - a tuple of two boolean values""",
14911491
field='channel')
14921492
tissues = traits.List(
14931493
traits.Tuple(
@@ -1681,11 +1681,11 @@ def _list_outputs(self):
16811681

16821682
if isdefined(self.inputs.channel_info):
16831683
if self.inputs.channel_info[2][0]:
1684-
outputs['bias_corrected_images'].append(
1685-
os.path.join(pth, "m%s.nii" % (base)))
1686-
if self.inputs.channel_info[2][1]:
16871684
outputs['bias_field_images'].append(
16881685
os.path.join(pth, "BiasField_%s.nii" % (base)))
1686+
if self.inputs.channel_info[2][1]:
1687+
outputs['bias_corrected_images'].append(
1688+
os.path.join(pth, "m%s.nii" % (base)))
16891689
return outputs
16901690

16911691

0 commit comments

Comments
 (0)