mirrorImg: Mirror/flip images

mirrorImgR Documentation

Mirror/flip images

Description

Flip images along the middle horizontal or vertical axis.

Usage

## S4 method for signature 'SpatRasterImage'
mirrorImg(
  x,
  direction = c("vertical", "horizontal"),
  filename = "",
  maxcell = NULL,
  ...
)

## S4 method for signature 'BioFormatsImage'
mirrorImg(x, direction = c("vertical", "horizontal"), ...)

## S4 method for signature 'ExtImage'
mirrorImg(x, direction = c("vertical", "horizontal"), ...)

Arguments

x

SpatRaster or SpatVector

direction

character. Should (partially) match "vertical" to flip by rows, or "horizontal" to flip by columns

filename

character. Output filename

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.

...

additional arguments for writing files as in writeRaster

Value

*Image object of the same class.

See Also

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


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