Skip to contents

Flip images along the middle horizontal or vertical axis.

Usage

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

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

# S4 method for 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.