Cuts out the area of the image that is covered by each barcode.

getImageSectionsByBarcode(object, barcodes = NULL, expand = 0, verbose = NULL)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

barcodes

Characte vector or NULL. If character, subsets the barcodes of interest. If NULL, all barcodes are considered.

expand

Specifies image expansion. An image that is cropped based on an image annotation centers around the image annotation. If expand = 0, the default, the dimensions of the image, that is width/x-axis and height/y-axis, are set to include only the image annotation area and nothing more. Using expand, the cropped image section can be adjusted. See section Expansion of cropped image sections for more information.

verbose

Logical. If TRUE, informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

Value

A named list. Each slot is named after one barcode. The content is another list that contains the barcode specific image section as well as the x- and y-ranges that were used to crop the section.