-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
In AIBL-to-BIDS, there are two ways an image can be missing from the output :
- It can happen that the converter chooses not to convert some images. Sometimes, images actually exist, are under the expected format ie inside a folder named after the date of the examination but the session cannot be matched to the metadata because the examination date is not indicated in it.
For example :
In this case, both sessions won't be converted even though the data exists since the value for EXAMDATE
is missing.
The user is not warned about it at all, which can be confusing.
- Conversion can fail. The following function is supposed to be warning users but it is not tested:
clinica/clinica/converters/aibl_to_bids/_converter.py
Lines 129 to 141 in 4f907bc
def _warn_about_missing_files(files: list[list[Optional[Path]]]): from clinica.utils.stream import cprint missing_files = [] for files_for_given_modality in files: for file in files_for_given_modality: if file is not None and not file.exists(): missing_files.append(file) if missing_files: msg = "The following file were not converted:\n" + "\n".join( (str(f) for f in missing_files) ) cprint(msg=msg, lvl="warning")
For example, if the conversion fails earlier and there is no filename for a failure then the user is not warned.