Backends are how annotatR reads image formats. Each supplies functions to read an image's metadata, fetch tiles, detect whether it can read a file, and report whether its optional dependencies are installed.
Usage
at_backend_register(
name,
read_fn,
tile_fn,
detect_fn,
available_fn,
description = "",
extensions = character(),
call = rlang::caller_env()
)Arguments
- name
Single string backend name (unique).
- read_fn
function(path, ...)returning an annot_image.- tile_fn
function(img, level, xrange, yrange, bands)returning a numeric array[y, x, band].- detect_fn
function(path)returningTRUEif the backend can read the file.- available_fn
function()returningTRUEif the backend's dependencies are installed.- description
Single string human-readable description.
- extensions
Character vector of file extensions the backend handles.
- call
The calling environment, for error reporting.
See also
at_backend_list(), at_read_image()
Other backends:
at_backend_detect(),
at_backend_get(),
at_backend_list(),
at_read_image(),
at_tile()