Skip to content

Commit 8ffc85a

Browse files
authored
fix exception thrown if cucim installed (#26)
1 parent c8b11fb commit 8ffc85a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/hest/wsi.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ def warn(cls):
2020

2121

2222
def is_cuimage(img):
23+
try:
24+
from cucim import CuImage
25+
except ImportError:
26+
CuImage = None
27+
CucimWarningSingleton.warn()
2328
return CuImage is not None and isinstance(img, CuImage) # type: ignore
2429

2530

0 commit comments

Comments
 (0)