AlignImages | R Documentation |
Image alignment or image registration consists in finding a rigid tranformation function that remaps pixels between two images so that two images are aligned. AlignImages allows you to align all images to a reference (any image present in the Seurat object) which simplifies the interpretation of spatial heatmaps and can be useful for creating 3D models. The transformation function is learned using the ICP (Iterative Closest Point) on two point sets which defines the edges of the tissues in the HE images. Note that this alignment works best for tissue sections that are intact, i.e. not cropped or folded. Also, because the method only used the edges of the tissue for alignment, you might end up with strange results if the tissue shape is symmetrical.
AlignImages( object, indices = NULL, reference.index = NULL, use.masked = FALSE, verbose = FALSE ) ## S3 method for class 'Staffli' AlignImages( object, indices = NULL, reference.index = NULL, use.masked = FALSE, verbose = FALSE ) ## S3 method for class 'Seurat' AlignImages( object, indices = NULL, reference.index = NULL, use.masked = FALSE, verbose = FALSE )
object |
A Seurat object |
indices |
Integer: sample indices of images to align with reference |
reference.index |
Integer: sample index of referece image |
use.masked |
Setting this to TRUE will ignore any "processed" images available in the object and apply the alignment from scratch. |
verbose |
Print messages |
A Staffli object
A Seurat object
## Not run: # Create a new Staffli object, mask, align and plot images st.obj <- CreateStaffliObject(imgs, meta.data) st.obj <- LoadImages(st.obj, verbose = TRUE) %>% MaskImages() %>% AlignImages() plot(st.obj) ## End(Not run) ## Not run: # Load, mask, align and plot images se <- LoadImages(se, verbose = TRUE) %>% MaskImages() %>% AlignImages() ImagePlot(se) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.