Skip to content

Latest commit breaks cuCIM-backed WSI loading in trident_compat.wsi_factory() #134

Description

@tunakasif

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions