From 50b89c4aeec0765bb1bf272d356355dd5608bb40 Mon Sep 17 00:00:00 2001 From: Eric Condamine <37933899+servoz@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:34:57 +0200 Subject: [PATCH 1/2] Use out_prefix instead of "w" in spm.Normalize12 Currently, for the Normalize12 process in spm, the user can define the out_prefix parameter, but this is not used to generate output, as it is hard-coded to 'w' in Normalize12._list_outputs(). --- nipype/interfaces/spm/preprocess.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nipype/interfaces/spm/preprocess.py b/nipype/interfaces/spm/preprocess.py index 0b3bfab8fb..505016b7a7 100644 --- a/nipype/interfaces/spm/preprocess.py +++ b/nipype/interfaces/spm/preprocess.py @@ -1491,13 +1491,13 @@ def _list_outputs(self): filelist = ensure_list(self.inputs.apply_to_files) for f in filelist: if isinstance(f, list): - run = [fname_presuffix(in_f, prefix="w") for in_f in f] + run = [fname_presuffix(in_f, prefix=self.inputs.out_prefix) for in_f in f] else: - run = [fname_presuffix(f, prefix="w")] + run = [fname_presuffix(f, prefix=self.inputs.out_prefix)] outputs["normalized_files"].extend(run) if isdefined(self.inputs.image_to_align): outputs["normalized_image"] = fname_presuffix( - self.inputs.image_to_align, prefix="w" + self.inputs.image_to_align, prefix=self.inputs.out_prefix ) return outputs From b9cac5e993143febb01ade42e56b41009427a4b6 Mon Sep 17 00:00:00 2001 From: Eric Condamine <37933899+servoz@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:36:40 +0200 Subject: [PATCH 2/2] run black for nipype/interfaces/spm/preprocess.py --- nipype/interfaces/spm/preprocess.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nipype/interfaces/spm/preprocess.py b/nipype/interfaces/spm/preprocess.py index 505016b7a7..8db09b2bfb 100644 --- a/nipype/interfaces/spm/preprocess.py +++ b/nipype/interfaces/spm/preprocess.py @@ -1491,7 +1491,10 @@ def _list_outputs(self): filelist = ensure_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=self.inputs.out_prefix) + for in_f in f + ] else: run = [fname_presuffix(f, prefix=self.inputs.out_prefix)] outputs["normalized_files"].extend(run)