Skip to content

Commit

Permalink
Bug in read_img using itk-io backend: 'NoneType' object has no at…
Browse files Browse the repository at this point in the history
…tribute 'CanReadFile'
  • Loading branch information
elazarcoh committed May 15, 2022
1 parent 68a025a commit 2b7347b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion medio/backends/itk_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def read_img(
)
elif input_path.is_file():
# If the input file is not a dicom (e.g. NIfTI), fallback to not use imageio.
use_dicom_imageio = imageio.CanReadFile(str(input_path))
use_dicom_imageio = imageio is not None and imageio.CanReadFile(str(input_path))
if use_dicom_imageio:
# we need to set the imageio to the reader, but with fallback_only=True it will not set it unless it fails
fallback_only = False
Expand Down

0 comments on commit 2b7347b

Please sign in to comment.