Factory for WSI reader instantiation with automatic backend selection.
Provides the WSI convenience class that selects the best available backend (CuCIM, OpenSlide, TiffSlide) based on the file extension and installed libraries.
get_extension
def get_extension(path: str) -> str
Extract and normalize file extension from a path.
File path or filename string.
Lowercase file extension including the leading dot.
WSI
Factory class for creating WSI readers with automatic backend selection.
Usage:
>>> reader = WSI("slide.svs", backend=WSI.Backend.AUTO)
>>> reader = WSI("slide.svs", backend=WSI.Backend.OPENSLIDE)
Backend
Supported backend identifiers and the AUTO selection flag.
list
@classmethod
def list(cls) -> List[str]
Return list of valid backend string values (excluding AUTO).
supported_extensions
@classmethod
def supported_extensions(cls) -> List[str]
Get list of all supported file extensions.
List of extension strings (e.g. [".svs", ".tiff", ...]).
available_backends
@classmethod
def available_backends(cls) -> Dict[str, bool]
Get availability status of all physical backends.
Mapping of backend name to availability boolean.