|
5 | 5 | from pydra.engine.specs import ShellSpec, ShellOutSpec, File, Directory, SpecInfo |
6 | 6 |
|
7 | 7 |
|
8 | | -def out_file_path(out_dir, filename, suffix, ext): |
| 8 | +def out_file_path(out_dir, filename, file_suffix, ext): |
9 | 9 | """Attempting to handle the different suffixes that are appended to filenames |
10 | 10 | created by Dcm2niix (see https://github.com/rordenlab/dcm2niix/blob/master/FILENAMING.md) |
11 | 11 | """ |
12 | 12 |
|
13 | 13 | fpath = Path(out_dir) / filename |
14 | | - fpath = fpath.with_suffix((suffix if suffix else "") + ext).absolute() |
| 14 | + fpath = fpath.with_suffix((file_suffix if file_suffix else "") + ext).absolute() |
15 | 15 |
|
16 | 16 | # Check to see if multiple echos exist in the DICOM dataset |
17 | 17 | if not fpath.exists(): |
18 | | - if suffix is not None: # NB: doesn't match attrs.NOTHING |
| 18 | + if file_suffix is not None: # NB: doesn't match attrs.NOTHING |
19 | 19 | neighbours = [ |
20 | 20 | str(p) for p in fpath.parent.iterdir() if p.name.endswith(ext) |
21 | 21 | ] |
22 | 22 | raise ValueError( |
23 | | - f"\nDid not find expected file '{fpath}' (suffix={suffix}) " |
| 23 | + f"\nDid not find expected file '{fpath}' (file_suffix={file_suffix}) " |
24 | 24 | "after DICOM -> NIfTI conversion, please see " |
25 | 25 | "https://github.com/rordenlab/dcm2niix/blob/master/FILENAMING.md for the " |
26 | 26 | "list of suffixes that dcm2niix produces and provide an appropriate " |
@@ -88,7 +88,7 @@ def dcm2niix_out_files(out_dir, filename): |
88 | 88 | {"argstr": "-f '{filename}'", "help_string": "The output name for the file"}, |
89 | 89 | ), |
90 | 90 | ( |
91 | | - "suffix", |
| 91 | + "file_suffix", |
92 | 92 | str, |
93 | 93 | { |
94 | 94 | "help_string": ( |
|
0 commit comments