loki.align.align_tissue
- loki.align.align_tissue(ad_tar_coor, ad_src_coor, pca_comb_features, src_img, alpha=0.5)
Aligns the source coordinates to the target coordinates using Coherent Point Drift (CPD) registration, and applies a homography transformation to warp the source coordinates accordingly.
- Parameters:
ad_tar_coor – Numpy array of target coordinates to which the source will be aligned.
ad_src_coor – Numpy array of source coordinates that will be aligned to the target.
pca_comb_features – PCA-combined feature matrix used as additional features for the alignment process.
src_img – Source image to be warped based on the alignment.
alpha – Regularization parameter for CPD registration, default is 0.5.
- Returns:
cpd_coor: The new source coordinates after CPD alignment.
homo_coor: The source coordinates after applying the homography transformation.
aligned_image: The source image warped based on the homography transformation.