DIAGNijmegen / rse-panimg

Conversion of medical images to MHA and TIFF.
Apache License 2.0
13 stars 5 forks source link

Raise import errors only when libopenslide/libvips are actually needed #21

Closed nlessmann closed 3 years ago

nlessmann commented 3 years ago

An attempt to fix #20

If the underlying libraries are not installed, importing the openslide or pyvips modules fails. This PR replaces the module with a mock module that raises an exception only when the module is actually used.

jmsmkn commented 3 years ago

Looks good, thanks! I will refactor this a little as otherwise the errors will get swallowed by the file import errors, I think they should be more explicit.