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"
)
An image, a 3d or 4d array.
File name.
number of bits per sample (numeric scalar). Supported values in this version are 8, 16, and 32.
Dimension of channels. TRUE for 2d images, FALSE for 3d images.
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).
Attributes of image stack. Will be propagated to each 2d image.
(see ?writeTIFF)