Writes image stack into a TIFF file. Wrapper for writeTIFF

writeTIF(
  img,
  file,
  bps = attributes(img)$bits.per.sample,
  twod = FALSE,
  reduce = TRUE,
  attr = attributes(img),
  compression = "none"
)

Arguments

img

An image, a 3d or 4d array.

file

File name.

bps

number of bits per sample (numeric scalar). Supported values in this version are 8, 16, and 32.

twod

Dimension of channels. TRUE for 2d images, FALSE for 3d images.

reduce

if TRUE then writeTIFF will attempt to reduce the number of planes in native rasters by analyzing the image to choose one of RGBA, RGB, GA or G formats, whichever uses the least planes without any loss. Otherwise the image is always saved with four planes (RGBA).

attr

Attributes of image stack. Will be propagated to each 2d image.

compression

(see ?writeTIFF)