Skip to content

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

Description

@ibro45

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.

f"required package for reader {r} is not installed, or the version doesn't match requirement."

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

Activity

  1. Bhavay-2001 commented on Feb 6, 2024

    @Bhavay-2001

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

  2. added a commit that references this issue on Feb 10, 2024
  3. KumoLiu commented on Mar 8, 2024

    @KumoLiu
    Contributor

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

  4. KumoLiu commented on Mar 23, 2024

    @KumoLiu
    Contributor

    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!

  5. added 2 commits that reference this issue on Mar 7, 2026
    0940296
    7712ff8
  6. added 4 commits that reference this issue on Mar 11, 2026
    1b6730f
    255db19
    1e6dd49
    8024900
  7. ericspod commented on Mar 29, 2026

    @ericspod
    Member

    Hi @its-serah, @abishop1990, and @haoyu-haoyu thanks all for addressing this issue. Sorry for the delays in getting to reviewing these, we've had a lot of other things blocking other progress as well. I think the three proposals all have their merits that we should combine together as the solutions are all quite similar. @its-serah's implementation was farthest along though we didn't figure out all the CI issues so didn't merge, @abishop1990 your solution has more user-friendly wording, @haoyu-haoyu the install hints are useful as well.

    I'd propose that @its-serah finish #8522 to fix the formatting complaint and the DCO issue. With that done either we merge PRs from @abishop1990 (#8768) and @haoyu-haoyu (#8771) after updates or you two collaborate on @its-serah's fork (if you are ok with that @its-serah). I want to get all your changes in and give you all contribution credit so please bear with us, thanks!

  8. added a commit that references this issue on Apr 12, 2026
    b1ce780
  9. vikasreddy11 commented on May 13, 2026

    @vikasreddy11

    Hi, I'd like to work on this.

  10. added a commit that references this issue on Aug 14, 2026
    1a165c9
  11. Talhax55z commented on Oct 1, 2026

    @Talhax55z
    Contributor

    I agree #8989 / #9142 is the better direction. I'm happy to close #8795 in favour of those. Once the pkg_name mechanism is merged I can rebase #8796 onto it for the reader side, or close it too, whichever you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions