From ec20405417bdd1d9d78ebc45596fdcab6aae9010 Mon Sep 17 00:00:00 2001 From: "k.matsubara91" Date: Tue, 20 Jan 2015 10:25:37 +0900 Subject: [PATCH 1/2] Fix bug in Normalize with modulation --- nipype/interfaces/spm/preprocess.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/spm/preprocess.py b/nipype/interfaces/spm/preprocess.py index b0fd07395b..19307c73f0 100644 --- a/nipype/interfaces/spm/preprocess.py +++ b/nipype/interfaces/spm/preprocess.py @@ -497,20 +497,24 @@ def _list_outputs(self): outputs['normalized_files'] = self.inputs.apply_to_files outputs['normalized_source'] = self.inputs.source elif 'write' in self.inputs.jobtype: + if isdefined(self.inputs.write_preserve) and self.inputs.write_preserve: + prefixNorm = ''.join(['m', self.inputs.out_prefix]) + else: + prefixNorm = self.inputs.out_prefix outputs['normalized_files'] = [] if isdefined(self.inputs.apply_to_files): filelist = filename_to_list(self.inputs.apply_to_files) for f in filelist: if isinstance(f, list): - run = [fname_presuffix(in_f, prefix=self.inputs.out_prefix) for in_f in f] + run = [fname_presuffix(in_f, prefix=prefixNorm) for in_f in f] else: - run = [fname_presuffix(f, prefix=self.inputs.out_prefix)] + run = [fname_presuffix(f, prefix=prefixNorm)] outputs['normalized_files'].extend(run) if isdefined(self.inputs.source): outputs['normalized_source'] = [] for imgf in filename_to_list(self.inputs.source): outputs['normalized_source'].append(fname_presuffix(imgf, - prefix=self.inputs.out_prefix)) + prefix=prefixNorm)) return outputs From 6b68252b9c9813158fdab38cbee88afd0bc4154d Mon Sep 17 00:00:00 2001 From: "k.matsubara91" Date: Tue, 20 Jan 2015 13:30:26 +0900 Subject: [PATCH 2/2] Add description for change in preprocess.py --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index 7e76b473d4..6c1e3d7288 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ Next release * FIX: Corrected Freesurfer SegStats _list_outputs to avoid error if summary_file is undefined (issue #994)(https://https://github.com/nipy/nipype/pull/996) * FIX: OpenfMRI support and FSL 5.0.7 changes (https://github.com/nipy/nipype/pull/1006) +* FIX: Output prefix in SPM Normalize with modulation (https://github.com/nipy/nipype/pull/1023) Release 0.10.0 (October 10, 2014) ============