TIFF files have the capability to store multiple images, each having multiple
channels. Typically, these multiple images represent the sequential frames in
a time-stack or z-stack of images and hence each of these images has the same
dimension. If this is the case, they are all read into a single 4-dimensional
array img
where img
is indexed as img[y, x, channel, frame]
(where we
have y, x
to comply with the conventional row, col
indexing of a matrix -
it means that images displayed as arrays of numbers in the R console will
have the correct orientation). However, it is possible that the images in the
TIFF file have varying dimensions (most people have never seen this), in
which case they are read in as a list of images, where again each element of
the list is a 4-dimensional array img
, indexed as img[y, x, channel, frame]
.
A (somewhat random) set of TIFF tags are attributed to the read image. These
are IMAGEDEPTH, BITSPERSAMPLE, SAMPLESPERPIXEL, SAMPLEFORMAT, PLANARCONFIG,
COMPRESSION, THRESHHOLDING, XRESOLUTION, YRESOLUTION, RESOLUTIONUNIT, INDEXED
and ORIENTATION. More tags should be added in a subsequent version of this
package. You can read about TIFF tags at
https://www.awaresystems.be/imaging/tiff/tifftags.html.
TIFF images can have a wide range of internal representations, but only the
most common in image processing are supported (8-bit, 16-bit and 32-bit
integer and 32-bit float samples).