toExtImage: Convert images to ExtImage

toExtImageR Documentation

Convert images to ExtImage

Description

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 signature 'BioFormatsImage'
toExtImage(x, resolution = 4L, channel = NULL)

## S4 method for signature 'SpatRasterImage'
toExtImage(x, maxcell = 1e+07, channel = NULL)

Arguments

x

Either a BioFormatsImage or SpatRasterImage 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.

Value

A ExtImage object. The image is loaded into memory.

See Also

toSpatRasterImage


pachterlab/SpatialFeatureExperiment documentation built on Dec. 20, 2024, 3:41 a.m.