The ExtImage
class is a thin wrapper around the Image
class in
ExtImage
so it inherits from VirtualSpatialImage
as required by
SpatialExperiment
and has extent as used in Voyager's plotting
functions. This function converts SpatRasterImage
(thin wrapper around
the class in terra
) and BioFormatsImage
into ExtImage
for
image operations as implemented in the ExtImage
package.
Usage
# S4 method for BioFormatsImage
toExtImage(x, resolution = 4L, channel = NULL)
# S4 method for SpatRasterImage
toExtImage(x, maxcell = 1e+07, channel = NULL)
Arguments
- x
Either a
BioFormatsImage
orSpatRasterImage
object.- resolution
Integer, which resolution in the
BioFormatsImage
to read and convert. Defaults to 4, which is a lower resolution. Ignored if only 1 resolution is present.- channel
Integer vector to indicate channel(s) to read. If
NULL
, then all channels will be read.- maxcell
Maximum number of pixels when
SpatRasterImage
is read into memory.