affineImg: Affine transformation of images

affineImgR Documentation

Affine transformation of images

Description

This function performs affine transformation on images, with any matrix and translation vector.

Usage

## S4 method for signature 'SpatRasterImage'
affineImg(x, M, v, maxcell = 1e+07, ...)

## S4 method for signature 'BioFormatsImage'
affineImg(x, M, v, ...)

## S4 method for signature 'ExtImage'
affineImg(x, M, v, ...)

Arguments

x

An object of class *Image as implemented in this package.

M

A 2x2 numeric matrix for the linear transformation in the xy plane.

v

A numeric vector of length 2 for translation in the xy plane.

maxcell

Max number of pixels to load SpatRasterImage into memory. The default 1e7 is chosen because this is the approximate number of pixels in the medium resolution image at resolution = 4L in Xenium OME-TIFF to make different methods of this function consistent.

...

Ignored. It's there so different methods can all be passed to the same lapply in the method for SFE objects. Some methods have extra arguments.

Value

SpatRasterImage will be converted to ExtImage. Otherwise *Image object of the same class. For BioFormatsImage, the transformation info is stored and will be applied when the image is loaded into memory as ExtImage.

See Also

Other image methods: SFE-image, cropImg(), dim,BioFormatsImage-method, ext(), imgRaster(), imgSource(), mirrorImg(), rotateImg(), scaleImg(), translateImg(), transposeImg()


pachterlab/SpatialFeatureExperiment documentation built on Aug. 23, 2024, 11:38 p.m.