Computes the area circular bins of the IAS algorithm cover.

getIasBinAreas(
  object,
  id,
  distance = NA_integer_,
  n_bins_circle = NA_integer_,
  binwidth = getCCD(object),
  angle_span = c(0, 360),
  n_bins_angle = 1,
  area_unit = NULL,
  use_outline = TRUE,
  remove_circle_bins = "Outside",
  verbose = NULL
)

Arguments

object

An object of class spata2.

id

Character value. The ID of the image annotation of interest.

distance

Distance value. Specifies the distance from the border of the image annotation to the horizon in the periphery up to which the screening is conducted. (See details for more.) - See details of ?is_dist for more information about distance values.

n_bins_circle

Numeric value or vector of length 2. Specifies how many times the area is buffered with the value denoted in binwidth. (See details for more.)

binwidth

Distance value. The width of the circular bins to which the barcode-spots are assigned. We recommend to set it equal to the center-center distance: binwidth = getCCD(object). (See details for more.) - See details of ?is_dist for more information about distance values.

angle_span

Numeric vector of length 2. Confines the area screened by an angle span relative to the center of the image annotation. (See details fore more.)

n_bins_angle

Numeric value. Number of bins that are created by angle. (See details for more.)

use_outline

Logical value. If TRUE, uses the outline variable set with setOutlineVarName() or if none is set DBSCAN to identify the outline of the tissue section or sections in case of multiple tissue sections on one Visium slide to only compute the area of circle bins that covers the tissue section.

verbose

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

(Warning messages will always be printed.)

Value

Data.frame in which each observation corresponds to a circular bin.

Details

Approximates the area each circular bin covers by assigning each pixel to the circular bin it falls into. Afterwards the number of pixels per bin is multiplied with the area scale factor as is obtained by getPixelScaleFactor(object, unit = unit) where unit is the squared unit of input for argument binwidth. E.g. if binwidth = '0.1mm' then unit = mm2.

Note

If multiple tissue sections are located on the Visium slide use createSpatialSegmentation() to encircle each section and set the variable name in which you saved the encircling via setOutlineVarName(). Else the areas of the circle bins might include space that is not covered by tissue. This might distort computation results.