Evaluate one of at_band_operations() on a window of an image. The result
is a display product: a [y, x, k] array (k = 3 for "rgb", otherwise 1)
with provenance attributes, which annotatR never uses as analysis input.
Usage
at_band_view(
img,
operation = "rgb",
bands = NULL,
params = list(),
level = 0L,
xrange = NULL,
yrange = NULL,
call = rlang::caller_env()
)Arguments
- img
An annot_image.
- operation
A registered operation name.
- bands
Band indices (defaults depend on the operation).
- params
Named list of operation parameters.
- level, xrange, yrange
Passed to
at_tile().- call
The calling environment, for error reporting.
Value
A numeric array with attributes operation, bands,
wavelengths, params, parent_digest, transform_digest, level and
display_product = TRUE.
Examples
cube <- at_example_image("cube")
v <- at_band_view(cube, "normalized_difference", bands = c(30, 10))
attr(v, "operation")
#> [1] "normalized_difference"