|
15 | 15 |
|
16 | 16 | # Local imports
|
17 | 17 | from ...utils.filemanip import (fname_presuffix, ensure_list,
|
18 |
| - simplify_list, split_filename, filename_to_list) |
| 18 | + simplify_list, split_filename) |
19 | 19 | from ..base import (OutputMultiPath, TraitedSpec, isdefined,
|
20 | 20 | traits, InputMultiPath, File, Str)
|
21 | 21 | from .base import (SPMCommand, scans_for_fname, func_is_3d,
|
@@ -406,8 +406,8 @@ def _list_outputs(self):
|
406 | 406 | if not isinstance(imgf, list) and func_is_3d(imgf):
|
407 | 407 | break
|
408 | 408 | if self.inputs.jobtype == "estimate":
|
409 |
| - outputs['realigned_files'] = self.inputs.in_files |
410 |
| - if (self.inputs.jobtype == "estimate" |
| 409 | + outputs['realigned_files'] = self.inputs.in_file |
| 410 | +s if (self.inputs.jobtype == "estimate" |
411 | 411 | or self.inputs.jobtype == "estwrite"):
|
412 | 412 | outputs['modified_in_files'] = self.inputs.in_files
|
413 | 413 | if self.inputs.jobtype == "write" or self.inputs.jobtype == "estwrite":
|
@@ -612,7 +612,7 @@ def _format_arg(self, opt, spec, val):
|
612 | 612 | """Convert input to appropriate format for spm
|
613 | 613 | """
|
614 | 614 | if opt == 'in_files':
|
615 |
| - return scans_for_fnames(filename_to_list(val), |
| 615 | + return scans_for_fnames(ensure_list(val), |
616 | 616 | keep4d=False,
|
617 | 617 | separate_sessions=True)
|
618 | 618 | return super(RealignUnwarp, self)._format_arg(opt, spec, val)
|
@@ -668,10 +668,10 @@ def _list_outputs(self):
|
668 | 668 |
|
669 | 669 | if resliced_all:
|
670 | 670 | outputs['realigned_unwarped_files'] = []
|
671 |
| - for idx, imgf in enumerate(filename_to_list(self.inputs.in_files)): |
| 671 | + for idx, imgf in enumerate(ensure_list(self.inputs.in_files)): |
672 | 672 | realigned_run = []
|
673 | 673 | if isinstance(imgf, list):
|
674 |
| - for i, inner_imgf in enumerate(filename_to_list(imgf)): |
| 674 | + for i, inner_imgf in enumerate(ensure_list(imgf)): |
675 | 675 | newfile = fname_presuffix(inner_imgf,
|
676 | 676 | prefix=self.inputs.out_prefix)
|
677 | 677 | realigned_run.append(newfile)
|
|
0 commit comments