Project-MONAI/MONAI

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

Open

#7437 aperta il 3 feb 2024

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)Python (888 fork)batch import
Contribution wantedenhancementgood first issue

Metriche repository

Star
 (4800 star)
Metriche merge PR
 (Merge medio 20g 8h) (35 PR mergiate in 30 g)

Descrizione

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.

Guida contributor