Skip to contents

The single, format-independent tile accessor. Returns a numeric array with dimensions [y, x, band] — always three-dimensional, even for a single band.

Usage

at_tile(
  img,
  level = 0L,
  xrange = NULL,
  yrange = NULL,
  bands = NULL,
  call = rlang::caller_env()
)

Arguments

img

An annot_image.

level

Integer pyramid level. Default 0.

xrange, yrange

Optional integer c(min, max) pixel ranges (1-based, inclusive) at level. NULL (default) means the full extent.

bands

Optional integer band indices. NULL (default) means all bands.

call

The calling environment, for error reporting.

Value

A numeric array with dimensions [y, x, band].

Examples

img <- at_example_image("tissue")
dim(at_tile(img, xrange = c(1, 16), yrange = c(1, 16)))
#> [1] 16 16  3