Closed valosekj closed 1 year ago
I just had an issue while using wildcards with the following YAML file:
FILES_LABEL:
- sub-*.nii.gz
The script is looking for a centerline file for no reason:
Do you have any ideas why @valosekj ?
Weird! Can you please debug the following lines:
I just did and I have that:
subject=''
ses=''
filename='sub-*.nii.gz'
And files
This line need to be fixed
files = sorted(glob.glob(os.path.join(path_img, '**', filename),
recursive=True))
Good catch! You are right, glob.glob '**'
returns all the files. But the files should be filtered based on the key (e.g., FILES_LABELS
). We can use filtering based on suffix_dict[task]
, as done here:
Not really, because the variable files
should only contain path to images, not labels.
Moreover, it not clear to me how were these paths created since no _centerline
files are available in the whole-spine dataset.
When using the following yml config file:
manual_correction.py
script does not interpret*
as a wildcard and prints an error about missing files:But still, the script then continues.