voyagerpy.spatial.apply_transforms#

voyagerpy.spatial.apply_transforms(adata: AnnData) None#

Apply unapplied image transforms.

This changes the image and coordinates in the AnnData object and removes any temporary transformations.

Parameters:

adata (AnnData) – Annotated data matrix.

Examples

>>> import voyagerpy as vp
    adata = ...
    vp.spatial.rotate_img90(adata, k=2, apply=False)
    vp.spatial.mirror_img(adata, k=2, apply=False)
    # The transforms are still temporary and not applied.
    vp.spatial.apply_transforms(adata)
    # The transforms are now applied, with image and coordinates rotated first, then mirrored.