MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

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

Open ibro45 opened this issue 1 year ago • 6 comments

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.

ibro45 avatar Feb 03 '24 16:02 ibro45

Hi @KumoLiu, I would like to work on this issue instead. Can you please guide me through this?

Bhavay-2001 avatar Feb 06 '24 15:02 Bhavay-2001

Is this issue still open? I have a draft request with code that should address the issue, looking for feedback

ghost avatar Mar 07 '24 18:03 ghost

Hi @girishsenthil,, free feel to create a PR, here is the contribution guide. https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md Thanks.

KumoLiu avatar Mar 08 '24 01:03 KumoLiu

https://github.com/girishsenthil/MONAI/pull/1#issue-2167268023 Let me know if there is anything I can change/improve, looking forward to your feedback @KumoLiu

Also - Not sure why commits from the main repo are being reflected in my branch, the file I changed is MONAI/monai/transforms/io/array.py

ghost avatar Mar 22 '24 19:03 ghost

Hi @girishsenthil, Thanks for all the hard work you've put in! I would like to recommend that you submit a PR in this repository, rather than your own. Please follow these steps: https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md#submitting-pull-requests

Thanks!

KumoLiu avatar Mar 23 '24 04:03 KumoLiu