3.2 Crop images
Sometimes we might be interested in only a small part of the tissue or we simply want to remove empty background from our H&E images. In this case, there is an option to crop the images by defining a list of “crop windows” to subset our data by. To make things easier, a helper function GetCropWindows()
is provided to extract such crop windows around predefined groups of spots.
<- GetCropWindows(object = se, group.by = "slide_id", xy_padding = 70)
crop.windows <- CropImages(se, crop.geometry.list = crop.windows) se
ImagePlot(se, method = "raster", type = "raw", annotate = FALSE)

Figure 3.2: Cfopped raw H&E images