wsidata.FetchAccessor#
- class FetchAccessor(obj)#
Bases:
objectAccessor for getting information from WSIData object.
Usage: wsidata.fetch
- features_anndata(feature_key, tile_key='tiles', tile_graph=True)#
Return the feature table as an AnnData object.
- Parameters:
- feature_keystr
The feature key.
- tile_keystr, default: “tiles”
The tile key.
- tile_graphbool, default: True
If True, include spatial graph information.
- Returns:
- AnnData
An AnnData object with the following components (if present):
X : The feature table.
obs : The data stored in the tile table.
obsm : The x,y coordinates for each tile.
obsp : The spatial graph information.
uns : Metadata including tile specifications and slide properties.
- n_tiles(key)#
Return the number of tiles in the tile table.
- Parameters:
- key: str
The tile key.
- Returns:
- int
The number of tiles.
- n_tissue(key)#
Return the number of tissue regions in the tissue table.
- Parameters:
- key: str
The tile key.
- Returns:
- int
The number of tissue regions.
- pyramids()#
Return the pyramid levels of the whole slide image.
- Returns:
- pd.DataFrame
A table of pyramid levels (index) with columns:
height : The height of the level (px).
width : The width of the level (px).
downsample : The downsample factor of the level.