Project-MONAI/MONAI

Raise the exception when LoadImage has a reader specified but it is not installed

Open

#7.437 geöffnet am 3. Feb. 2024

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (888 Forks)batch import
Contribution wantedenhancementgood first issue

Repository-Metriken

Stars
 (4.800 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 20T 8h) (35 gemergte PRs in 30 T)

Beschreibung

Describe the bug Running LoadImage(reader="ITKReader") without itk installed will just warn that itk is not installed and will proceed with using PILReader instead.

https://github.com/Project-MONAI/MONAI/blob/33afaefff925dce45b8331e8290f234a4d95fd51/monai/transforms/io/array.py#L185

Expected behavior If the specified reader is not installed, an exception should be raised.

Contributor Guide