Skip to contents

Return the pixel dimensions c(width, height) of an annot_image at a given pyramid level.

Usage

at_dims(x, level = 0L, call = rlang::caller_env())

# S3 method for class 'annot_image'
dim(x)

Arguments

x

An annot_image.

level

Integer pyramid level, 0 for full resolution. Must be in 0:(at_n_levels(x) - 1).

call

The calling environment, for error reporting.

Value

An integer vector of length 2, c(width, height).

Details

dim() on an annot_image returns c(width, height, bands) at level 0. Note the order: width first, unlike the [y, x, band] arrays returned by at_tile(), so nrow() gives the width.

Examples

# Image handles come from at_read_image(); see the images vignette.