Summary
With the commit 6a8a9b8, while switching from hestcore backbone to trident_compat, the wsi_factory(...) is not ported fully/correctly. Hence, using cuCIM backbone raises a Unsupported WSI input type error.
Reason
The latest commit appears to break the cuCIM backbone due to an incomplete port of wsi_factory(...) from the old hestcore backend into trident_compat. In the current code path, HESTData.from_paths(...) calls img = read_img_hest(img) (HESTData.py#L133) before constructing the HESTData object, so img can already be a CuImage object by the time it reaches wsi_factory(...).
However, the current trident_compat.wsi_factory(...) only handles WSI, np.ndarray, str/Path, and an OpenSlide-like object identified by read_region and dimensions. It does not explicitly handle a CuImage input the way the older backend did.
Suggested Fix
Port the missing CuImage handling from the old hestcore implementation into trident_compat.wsi_factory(), and/or ensure reader_type is forwarded so the correct reader is selected inside trident if cucim is available.
Summary
With the commit 6a8a9b8, while switching from
hestcorebackbone totrident_compat, thewsi_factory(...)is not ported fully/correctly. Hence, usingcuCIMbackbone raises aUnsupported WSI input typeerror.Reason
The latest commit appears to break the
cuCIMbackbone due to an incomplete port ofwsi_factory(...)from the oldhestcorebackend intotrident_compat. In the current code path,HESTData.from_paths(...)callsimg = read_img_hest(img)(HESTData.py#L133) before constructing theHESTDataobject, soimgcan already be aCuImageobject by the time it reacheswsi_factory(...).However, the current
trident_compat.wsi_factory(...)only handlesWSI,np.ndarray,str/Path, and anOpenSlide-like object identified byread_regionanddimensions. It does not explicitly handle aCuImageinput the way the older backend did.Suggested Fix
Port the missing
CuImagehandling from the oldhestcoreimplementation intotrident_compat.wsi_factory(), and/or ensurereader_typeis forwarded so the correct reader is selected insidetridentifcucimis available.