ijtiff (version 2.0.2)

count_frames: Count the number of frames in a TIFF file.

Description

TIFF files can hold many frames. Often this is sensible, e.g. each frame could be a time-point in a video or a slice of a z-stack.

Usage

count_frames(path)

Arguments

path

A string. The path to the tiff file to read.

Value

A number, the number of frames in the TIFF file. This has an attribute n_dirs which holds the true number of directories in the TIFF file, making no allowance for the way ImageJ may write TIFF files.

Details

For those familiar with TIFF files, this function counts the number of directories in a TIFF file. There is an adjustment made for some ImageJ-written TIFF files.

Examples

Run this code
# NOT RUN {
count_frames(system.file("img", "Rlogo.tif", package = "ijtiff"))
count_frames(system.file("img", "2ch_ij.tif", package = "ijtiff"))
# }

Run the code above in your browser using DataCamp Workspace