__getitem__ interface.
MultiModalData
WSI and the extractor is fitted + executed to produce a list of RegionSpec. Each spec describes one tile/patch location. Patches are read lazily via get_patch.
Optional path to bulk RNA CSV.
A configured
TileExtractor. A fresh fit_extract is called for every slide so the same extractor object can be reused across slides.Optional callable applied to the raw
np.ndarray patch before it is returned. Receives (H, W, C) uint8 and should return a transformed array (or tensor).pathPath - Resolved slide path.bulk_rna_pathPath | None - Resolved path to bulk RNA CSV.readerWSIReader - Open reader for the slide.specsList[RegionSpec] - Extraction plan (one entry per patch).slide_namestr - Stem of the slide filename.
__len__
int- Total patch count for this slide.
get_patch
Index into
specs.(patch, metadata) where patch is an
np.ndarray of shape (H, W, C) (or whatever the
transform returns), and metadata is a dict with at
minimum source, x, y, width, height,
slide_name, and tissue_ratio.
Raises:
IndexError- If idx is out of range.

