Skip to contents

Simple converter from .ome.tif to .tif format. Utilizes the python tifffile package. Performs image conversions one page at a time. Wrap this in a for loop or lapply for more than one image or page.

Usage

ometif_to_tif(
  input_file,
  output_dir = file.path(dirname(input_file), "tif_exports"),
  page,
  overwrite = FALSE
)

Arguments

input_file

character. Filepath to ome.tif to convert

output_dir

character. Directory to write .tif to. Defaults to a new folder in the directory called "tif_exports"

page

numeric. Which page of the tif to open (if needed). If provided, a "_%04d" formatted suffix will be added to the output filename.

overwrite

logical. Default = FALSE. Whether to overwrite if the filename already exists.

Value

returns the written filepath invisibly

See also

Other ometif utility functions: ometif_metadata()