Skip to content

Commit

Permalink
BUG: fix bug with DWI ADC images not removed by ADNI to BIDS (aramis-…
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGensollen authored Feb 1, 2024
1 parent 2f160fb commit 465ad58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clinica/iotools/converters/adni_to_bids/adni_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,12 @@ def create_file(
# Removing images with unsupported suffixes if generated by dcm2niix
for suffix in ("ADC", "real", "imaginary"):
file_with_bad_suffix = output_path / f"{output_filename}_{suffix}"
if file_with_bad_suffix.with_suffix(".nii").exists():
if any(
[
file_with_bad_suffix.with_suffix(s).exists()
for s in (".nii", ".nii.gz")
]
):
cprint(
f"Image with bad suffix {suffix} was generated by dcm2niix "
f"for subject {subject} and session {session} : "
Expand Down

0 comments on commit 465ad58

Please sign in to comment.